aipim-rails 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d25188c189a2fe95c0981e899ba2a959c976f3d3
4
- data.tar.gz: 9c034938385d82d7c46e12af5f0b6ff94ef38ac7
3
+ metadata.gz: f25b31823c9434d9542ec3b7e49232710328078c
4
+ data.tar.gz: 2b58a29e80cc8c65f93842659d21f0b9c86bcdf9
5
5
  SHA512:
6
- metadata.gz: 83dcf3f78ac4116979132242670e4ca07b4f459a8b987197e65195bd7450f91730b7ed70ad7d78d4d94d97f547bd8908717423e0f1b6a481c96c29301cb091b9
7
- data.tar.gz: f9c478b5ea787c71066f430556a76afa3f01d8525775e8ff8171dbef68c216695b77633624574d63fab18ad47aed6eec5c3a698298af705ae93967778f683c56
6
+ metadata.gz: eb94643d94ec7378c7a338d0510b33567879e4b7207127a5fb7c337b76a347dbf02894c372925009ba34c5f664227b7e8e62780a73b2d5f5205d62dff26f36ca
7
+ data.tar.gz: e2c5fc42631e661b1fae18519c036140e0a74089406aba95604f2deada1e69072b7801dc4c46a9b208a97ee6d6e6c60513c29b661b00536c82ee1c414ef231f6
data/bin/aipim CHANGED
@@ -29,6 +29,7 @@ elsif ARGV[0] == 'html'
29
29
 
30
30
  elsif ARGV[0] == 'markdown' || ARGV[0] == 'md'
31
31
  %x[rm -rf aipim/markdown]
32
+ %x[mkdir -p aipim/markdown]
32
33
  files = []
33
34
  ARGV.delete_at(0)
34
35
  ARGV.each do |arg|
@@ -15,7 +15,6 @@ module Parser
15
15
 
16
16
  def self.read_links(filename)
17
17
  cenario_counter = 1
18
- system("mkdir -p aipim/markdown")
19
18
  output = File.new("aipim/markdown/#{filename}.md", "w")
20
19
  file = File.new("features/#{filename}", "r")
21
20
  while(line = read_line(file))
@@ -1,14 +1,26 @@
1
1
  require 'selenium-webdriver'
2
2
 
3
- %x[rm aipim/screenshots/*]
3
+ %x[rm -r aipim/screenshots/*]
4
+
5
+ Before do |scenario|
6
+ @ScenarioTitle = scenario.title
7
+ @ScenarioDescription = scenario.description
8
+ @FeatureFile = scenario.file.to_s.split('/')
9
+ @FeatureFile.delete_at(0)
10
+ @FeatureFile = @FeatureFile.join('/')
11
+ @FeatureName = scenario.feature.title
12
+ @ScenarioTags = scenario.source_tag_names
4
13
 
5
- Before('@javascript') do |scenario|
6
14
  page.driver.browser.manage.window.maximize
15
+ page.driver.browser.manage.window.resize_to(1024, 768)
7
16
  end
8
17
 
9
- After('@screenshot') do
10
- return unless page.driver.browser
11
- sleep(1.0)
12
- page.driver.save_screenshot("aipim/screenshots/#{Time.now.to_i}.png")
13
- end
18
+ After do
19
+ if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript')) && !page.driver.browser.nil?
20
+ path = "aipim/screenshots/#{@FeatureFile}"
21
+ system("mkdir -p #{path}")
14
22
 
23
+ sleep(1.0)
24
+ page.driver.save_screenshot("#{path}/#{Time.now.to_i}.png")
25
+ end
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aipim-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.40
4
+ version: 0.0.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facta TI