Fixing coding standards
This commit is contained in:
parent
748e0fdcf4
commit
f33d58f4bb
lib/additionals/wiki_macros
calendar_macro.rbcryptocompare_macro.rbdate_macro.rbgmap_macro.rbgroup_users_macro.rbiframe_macro.rbissue_macro.rbmember_macro.rbmeteoblue_macro.rbproject_macro.rbrecently_updated_macro.rbreddit_macro.rbslideshare_macro.rbtradingview_macro.rbtwitter_macro.rbvimeo_macro.rbyoutube_macro.rb
test/integration/api_test
@ -3,16 +3,16 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display calendar (only works on wiki pages)
|
Display calendar (only works on wiki pages)
|
||||||
Examples:
|
|
||||||
|
|
||||||
{{calendar}} show calendar for current date
|
Examples:
|
||||||
{{calendar(year=2014,month=6)}} show calendar for Juni in year 2014
|
|
||||||
{{calendar(show_weeks=true)}} show calendar with week numbers
|
|
||||||
{{calendar(select=2015-07-12 2015-07-31, show_weeks=true)}} preselect dates and show week numbers
|
|
||||||
{{calendar(select=2016-03-13:2016-03-27)}} preselect dates between 2016/3/13 and 2016/3/27
|
|
||||||
|
|
||||||
DESCRIPTION
|
{{calendar}} show calendar for current date
|
||||||
|
{{calendar(year=2014,month=6)}} show calendar for Juni in year 2014
|
||||||
|
{{calendar(show_weeks=true)}} show calendar with week numbers
|
||||||
|
{{calendar(select=2015-07-12 2015-07-31, show_weeks=true)}} preselect dates and show week numbers
|
||||||
|
{{calendar(select=2016-03-13:2016-03-27)}} preselect dates between 2016/3/13 and 2016/3/27
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
macro :calendar do |_obj, args|
|
macro :calendar do |_obj, args|
|
||||||
raise 'Only works on wiki page' unless controller_name == 'wiki' && action_name == 'show'
|
raise 'Only works on wiki page' unless controller_name == 'wiki' && action_name == 'show'
|
||||||
|
@ -6,8 +6,9 @@ module Additionals
|
|||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Create CryptoCompare information.
|
Create CryptoCompare information.
|
||||||
{{cryptocompare(options)}}
|
{{cryptocompare(options)}}
|
||||||
see https://additionals.readthedocs.io/en/latest/macros/#cryptocompare
|
see https://additionals.readthedocs.io/en/latest/macros/#cryptocompare
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :cryptocompare do |_obj, args|
|
macro :cryptocompare do |_obj, args|
|
||||||
raise 'The correct usage is {{cryptocompare(options)}}' if args.empty?
|
raise 'The correct usage is {{cryptocompare(options)}}' if args.empty?
|
||||||
_args, options = extract_macro_options(args, :fsym, :fsyms, :tsym, :tsyms, :period, :type)
|
_args, options = extract_macro_options(args, :fsym, :fsyms, :tsym, :tsyms, :period, :type)
|
||||||
|
@ -3,17 +3,19 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display current dates. Examples:
|
Display current dates.
|
||||||
|
|
||||||
{{current_year}} current year
|
Examples:
|
||||||
{{current_month}} current month
|
|
||||||
{{current_day}} current day
|
{{current_year}} current year
|
||||||
{{current_day}} current day
|
{{current_month}} current month
|
||||||
{{current_hour}} current hour
|
{{current_day}} current day
|
||||||
{{current_minute}} current minute
|
{{current_day}} current day
|
||||||
{{current_weekday}} current weekday
|
{{current_hour}} current hour
|
||||||
{{current_weeknumber}} current week number (1 - 52) The week starts with Monday
|
{{current_minute}} current minute
|
||||||
DESCRIPTION
|
{{current_weekday}} current weekday
|
||||||
|
{{current_weeknumber}} current week number (1 - 52) The week starts with Monday
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
macro :current_year do |_obj, _args|
|
macro :current_year do |_obj, _args|
|
||||||
content_tag(:span, Additionals.now_with_user_time_zone.year, class: 'current-date')
|
content_tag(:span, Additionals.now_with_user_time_zone.year, class: 'current-date')
|
||||||
|
@ -3,18 +3,18 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display a google map. Examples:
|
Display a google map. Examples:
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{gmap([q=QUERY, mode=MODE, width=216, height=368])}}
|
{{gmap([q=QUERY, mode=MODE, width=216, height=368])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{gmap(Munich)}} Google maps with Munich
|
{{gmap(Munich)}} Google maps with Munich
|
||||||
|
|
||||||
{{gmap(mode=directions, origin=Munich+Rosenheimerstr, destination=Arco)}} Direction from Munich to Arco
|
{{gmap(mode=directions, origin=Munich+Rosenheimerstr, destination=Arco)}} Direction from Munich to Arco
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :gmap do |_obj, args|
|
macro :gmap do |_obj, args|
|
||||||
src_options = %i[attribution_ios_deep_link_id
|
src_options = %i[attribution_ios_deep_link_id
|
||||||
|
@ -3,18 +3,17 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display users of group.
|
Display users of group.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{group_users(GROUP_NAME}}
|
{{group_users(GROUP_NAME}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{group_users(Team)}}
|
{{group_users(Team)}}
|
||||||
...List all users in user group "Team" (with the current user permission)
|
...List all users in user group "Team" (with the current user permission)
|
||||||
|
DESCRIPTION
|
||||||
DESCRIPTION
|
|
||||||
|
|
||||||
macro :group_users do |_obj, args|
|
macro :group_users do |_obj, args|
|
||||||
raise 'The correct usage is {{group_users(<group_name>)}}' if args.empty?
|
raise 'The correct usage is {{group_users(<group_name>)}}' if args.empty?
|
||||||
|
@ -3,20 +3,20 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Include iframe
|
Include iframe
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{iframe(<url> [, width=100%, height=485)}}
|
{{iframe(<url> [, width=100%, height=485)}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
show iframe of URL https://www.google.com/
|
show iframe of URL https://www.google.com/
|
||||||
{{iframe(https://www.google.com/)}}
|
{{iframe(https://www.google.com/)}}
|
||||||
|
|
||||||
show iframe of URL https://www.google.com/ and show link to it
|
show iframe of URL https://www.google.com/ and show link to it
|
||||||
{{iframe(https://www.google.com/, with_link: true)}}
|
{{iframe(https://www.google.com/, with_link: true)}}
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :iframe do |_obj, args|
|
macro :iframe do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :width, :height, :slide, :with_link)
|
args, options = extract_macro_options(args, :width, :height, :slide, :with_link)
|
||||||
|
@ -2,35 +2,36 @@
|
|||||||
module Additionals
|
module Additionals
|
||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Create a link to issue with the subject of this issue.
|
Create a link to issue with the subject of this issue.
|
||||||
Syntax:
|
|
||||||
|
|
||||||
{{issue(URL [, format=USER_FORMAT, id=ID, note_id=NOTE_ID)}}
|
Syntax:
|
||||||
URL is URL to issue
|
|
||||||
USER_FORMATS
|
|
||||||
- text
|
|
||||||
- short
|
|
||||||
- link (default)
|
|
||||||
- full
|
|
||||||
ID is issue
|
|
||||||
NOTE_ID is note id, if you want to display it
|
|
||||||
|
|
||||||
Examples:
|
{{issue(URL [, format=USER_FORMAT, id=ID, note_id=NOTE_ID)}}
|
||||||
|
URL is URL to issue
|
||||||
|
USER_FORMATS
|
||||||
|
- text
|
||||||
|
- short
|
||||||
|
- link (default)
|
||||||
|
- full
|
||||||
|
ID is issue
|
||||||
|
NOTE_ID is note id, if you want to display it
|
||||||
|
|
||||||
{{issue(1)}}
|
Examples:
|
||||||
...Link to issue with id and subject
|
|
||||||
{{issue(http://myredmine.url/issues/1)}}
|
{{issue(1)}}
|
||||||
...Link to issue with id and subject
|
...Link to issue with id and subject
|
||||||
{{issue(http://myredmine.url/issues/1#note-3)}}
|
{{issue(http://myredmine.url/issues/1)}}
|
||||||
...Link to issue with id and subject and display comment 3
|
...Link to issue with id and subject
|
||||||
{{issue(1, format=short)}}
|
{{issue(http://myredmine.url/issues/1#note-3)}}
|
||||||
...Link to issue with subject (without id)
|
...Link to issue with id and subject and display comment 3
|
||||||
{{issue(1, format=text)}}
|
{{issue(1, format=short)}}
|
||||||
...Display subject name
|
...Link to issue with subject (without id)
|
||||||
{{issue(1, format=full)}}
|
{{issue(1, format=text)}}
|
||||||
...Link to issue with track, issue id and subject
|
...Display subject name
|
||||||
DESCRIPTION
|
{{issue(1, format=full)}}
|
||||||
|
...Link to issue with track, issue id and subject
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
macro :issue do |_obj, args|
|
macro :issue do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :id, :note_id, :format)
|
args, options = extract_macro_options(args, :id, :note_id, :format)
|
||||||
|
@ -3,31 +3,30 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display members.
|
Display members.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{members([PROJECT_NAME, title=My members list, role=ROLE)]}}
|
{{members([PROJECT_NAME, title=My members list, role=ROLE)]}}
|
||||||
|
|
||||||
PROJECT_NAME can be project identifier, project name or project id
|
PROJECT_NAME can be project identifier, project name or project id
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{members}}
|
{{members}}
|
||||||
...List all members for all projects (with the current user permission)
|
...List all members for all projects (with the current user permission)
|
||||||
|
|
||||||
{{members(the-identifier)}}
|
{{members(the-identifier)}}
|
||||||
...A box showing all members for the project with the identifier of 'the-identifier'
|
...A box showing all members for the project with the identifier of 'the-identifier'
|
||||||
|
|
||||||
{{members(the-identifier, role=Manager)}}
|
{{members(the-identifier, role=Manager)}}
|
||||||
...A box showing all members for the project with the identifier of 'the-identifier', which
|
...A box showing all members for the project with the identifier of 'the-identifier', which
|
||||||
have the role "Manager"
|
have the role "Manager"
|
||||||
|
|
||||||
{{members(the-identifier, title=My user list)}}
|
{{members(the-identifier, title=My user list)}}
|
||||||
...A box showing all members for the project with the identifier of 'the-identifier' and with
|
...A box showing all members for the project with the identifier of 'the-identifier' and with
|
||||||
box title "My user list"
|
box title "My user list"
|
||||||
|
DESCRIPTION
|
||||||
DESCRIPTION
|
|
||||||
|
|
||||||
macro :members do |_obj, args|
|
macro :members do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :role, :title)
|
args, options = extract_macro_options(args, :role, :title)
|
||||||
|
@ -3,18 +3,18 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display current weather from meteoblue service. Examples:
|
Display current weather from meteoblue service. Examples:
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{meteoblue(<location> [, days=INT, width=216, height=368, color=BOOL])}}
|
{{meteoblue(<location> [, days=INT, width=216, height=368, color=BOOL])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{meteoblue(münchen_deutschland_2867714)}} weather for Munich
|
{{meteoblue(münchen_deutschland_2867714)}} weather for Munich
|
||||||
|
|
||||||
{{meteoblue(münchen_deutschland_2867714, days=6, color=false)}} weather for Munich of the next 6 days without color
|
{{meteoblue(münchen_deutschland_2867714, days=6, color=false)}} weather for Munich of the next 6 days without color
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :meteoblue do |_obj, args|
|
macro :meteoblue do |_obj, args|
|
||||||
args, options = extract_macro_options(args,
|
args, options = extract_macro_options(args,
|
||||||
|
@ -3,24 +3,23 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Display projects.
|
Display projects.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{projects([title=My project list, with_create_issue=BOOL])}}
|
{{projects([title=My project list, with_create_issue=BOOL])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{projects}}
|
{{projects}}
|
||||||
...List all project, which I am member of
|
...List all project, which I am member of
|
||||||
|
|
||||||
{{projects(title=My project list)}}
|
{{projects(title=My project list)}}
|
||||||
...List all project with title "My project list", which I am member of
|
...List all project with title "My project list", which I am member of
|
||||||
|
|
||||||
{{projects(with_create_issue=true)}}
|
{{projects(with_create_issue=true)}}
|
||||||
...List all project with link to create new issue, which I am member of
|
...List all project with link to create new issue, which I am member of
|
||||||
|
DESCRIPTION
|
||||||
DESCRIPTION
|
|
||||||
|
|
||||||
macro :projects do |_obj, args|
|
macro :projects do |_obj, args|
|
||||||
_args, options = extract_macro_options(args, :title, :with_create_issue)
|
_args, options = extract_macro_options(args, :title, :with_create_issue)
|
||||||
|
@ -7,14 +7,13 @@ module Additionals
|
|||||||
{{recently_updated}}
|
{{recently_updated}}
|
||||||
{{recently_updated([days])}}
|
{{recently_updated([days])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{recently_updated}}
|
{{recently_updated}}
|
||||||
...List last updated pages (of the last 5 days)
|
...List last updated pages (of the last 5 days)
|
||||||
|
|
||||||
{{recently_updated(15)}}
|
{{recently_updated(15)}}
|
||||||
...List last updated pages of the last 15 days
|
...List last updated pages of the last 15 days
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :recently_updated do |obj, args|
|
macro :recently_updated do |obj, args|
|
||||||
|
@ -5,7 +5,8 @@ module Additionals
|
|||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Creates link to reddit.
|
Creates link to reddit.
|
||||||
{{reddit(name)}}
|
{{reddit(name)}}
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :reddit do |_obj, args|
|
macro :reddit do |_obj, args|
|
||||||
raise 'The correct usage is {{reddit(<name>)}}' if args.empty?
|
raise 'The correct usage is {{reddit(<name>)}}' if args.empty?
|
||||||
name = args[0].strip
|
name = args[0].strip
|
||||||
|
@ -3,18 +3,18 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Slideshare macro to include Slideshare slide.
|
Slideshare macro to include Slideshare slide.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{slideshare(<key> [, width=595, height=485, slide=SLIDE])}}
|
{{slideshare(<key> [, width=595, height=485, slide=SLIDE])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{slideshare(57941706)}} show slideshare slide with default size 595x485
|
{{slideshare(57941706)}} show slideshare slide with default size 595x485
|
||||||
{{slideshare(57941706, width=514, height=422)}} show slide with user defined size
|
{{slideshare(57941706, width=514, height=422)}} show slide with user defined size
|
||||||
{{slideshare(57941706, slide=5)}} start with slide (page) 5
|
{{slideshare(57941706, slide=5)}} start with slide (page) 5
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :slideshare do |_obj, args|
|
macro :slideshare do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :width, :height, :slide)
|
args, options = extract_macro_options(args, :width, :height, :slide)
|
||||||
|
@ -7,7 +7,8 @@ module Additionals
|
|||||||
Creates Tradingview chart
|
Creates Tradingview chart
|
||||||
{{tradingview(options)}}
|
{{tradingview(options)}}
|
||||||
see https://additionals.readthedocs.io/en/latest/macros/#tradingview
|
see https://additionals.readthedocs.io/en/latest/macros/#tradingview
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :tradingview do |_obj, args|
|
macro :tradingview do |_obj, args|
|
||||||
raise 'The correct usage is {{tradingview(options)}}' if args.empty?
|
raise 'The correct usage is {{tradingview(options)}}' if args.empty?
|
||||||
_args, options = extract_macro_options(args, :width, :height, :symbol, :interval, :timezone,
|
_args, options = extract_macro_options(args, :width, :height, :symbol, :interval, :timezone,
|
||||||
|
@ -5,7 +5,8 @@ module Additionals
|
|||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Creates link to twitter account page or topic.
|
Creates link to twitter account page or topic.
|
||||||
{{twitter(name)}}
|
{{twitter(name)}}
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :twitter do |_obj, args|
|
macro :twitter do |_obj, args|
|
||||||
raise 'The correct usage is {{twitter(<name>)}}' if args.empty?
|
raise 'The correct usage is {{twitter(<name>)}}' if args.empty?
|
||||||
name = args[0].strip
|
name = args[0].strip
|
||||||
|
@ -3,18 +3,18 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Vimeo macro to include vimeo video.
|
Vimeo macro to include vimeo video.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{vimeo(<video key> [, width=640, height=360, autoplay=BOOL])}}
|
{{vimeo(<video key> [, width=640, height=360, autoplay=BOOL])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{vimeo(142849533)}} show video with default size 640x360
|
{{vimeo(142849533)}} show video with default size 640x360
|
||||||
{{vimeo(142849533, width=853, height=480)}} show video with user defined size
|
{{vimeo(142849533, width=853, height=480)}} show video with user defined size
|
||||||
{{vimeo(142849533, autoplay=true)}} autoplay video
|
{{vimeo(142849533, autoplay=true)}} autoplay video
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :vimeo do |_obj, args|
|
macro :vimeo do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :width, :height, :autoplay)
|
args, options = extract_macro_options(args, :width, :height, :autoplay)
|
||||||
|
@ -3,18 +3,18 @@ module Additionals
|
|||||||
module WikiMacros
|
module WikiMacros
|
||||||
Redmine::WikiFormatting::Macros.register do
|
Redmine::WikiFormatting::Macros.register do
|
||||||
desc <<-DESCRIPTION
|
desc <<-DESCRIPTION
|
||||||
Youtube macro to include youtube video.
|
Youtube macro to include youtube video.
|
||||||
|
|
||||||
Syntax:
|
Syntax:
|
||||||
|
|
||||||
{{youtube(<video key> [, width=640, height=360, autoplay=BOOL])}}
|
{{youtube(<video key> [, width=640, height=360, autoplay=BOOL])}}
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
{{youtube(KMU0tzLwhbE)}} show video with default size 640x360
|
{{youtube(KMU0tzLwhbE)}} show video with default size 640x360
|
||||||
{{youtube(KMU0tzLwhbE, width=853, height=480)}} show video with user defined size
|
{{youtube(KMU0tzLwhbE, width=853, height=480)}} show video with user defined size
|
||||||
{{youtube(KMU0tzLwhbE, autoplay=true)}} autoplay video
|
{{youtube(KMU0tzLwhbE, autoplay=true)}} autoplay video
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
macro :youtube do |_obj, args|
|
macro :youtube do |_obj, args|
|
||||||
args, options = extract_macro_options(args, :width, :height, :autoplay)
|
args, options = extract_macro_options(args, :width, :height, :autoplay)
|
||||||
|
@ -47,14 +47,14 @@ module ApiTest
|
|||||||
)
|
)
|
||||||
|
|
||||||
payload = <<-XML
|
payload = <<-XML
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<issue>
|
<issue>
|
||||||
<project_id>1</project_id>
|
<project_id>1</project_id>
|
||||||
<tracker_id>2</tracker_id>
|
<tracker_id>2</tracker_id>
|
||||||
<status_id>3</status_id>
|
<status_id>3</status_id>
|
||||||
<subject>API test</subject>
|
<subject>API test</subject>
|
||||||
</issue>
|
</issue>
|
||||||
XML
|
XML
|
||||||
|
|
||||||
assert_difference('Issue.count') do
|
assert_difference('Issue.count') do
|
||||||
post '/issues.xml',
|
post '/issues.xml',
|
||||||
@ -80,12 +80,12 @@ module ApiTest
|
|||||||
)
|
)
|
||||||
|
|
||||||
payload = <<-XML
|
payload = <<-XML
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<issue>
|
<issue>
|
||||||
<project_id>1</project_id>
|
<project_id>1</project_id>
|
||||||
<subject>API test</subject>
|
<subject>API test</subject>
|
||||||
</issue>
|
</issue>
|
||||||
XML
|
XML
|
||||||
|
|
||||||
assert_difference('Issue.count') do
|
assert_difference('Issue.count') do
|
||||||
post '/issues.xml',
|
post '/issues.xml',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user