aipim-rails 0.0.174 → 0.0.179

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: cd9d280457c11e1e979480fedda1aa57254c095d
4
- data.tar.gz: 3f679b64ecb5f3233f6f7d7688466c72a462d89a
3
+ metadata.gz: 0991c1067e6306ba73f5c37bd2491e0ce6279f47
4
+ data.tar.gz: fd8616584a22eb61e9938d2e49f1d51ef2a58610
5
5
  SHA512:
6
- metadata.gz: 996c074e11bdab42623b1ed84bfe5b4e0c14a1731bb46f6f33da2cd17fe43b4d9fb4cd5ec8bd2b45bff6dcd814bf1ef025e685ad071a2278ae792d7fc24bf2d1
7
- data.tar.gz: dc341c14791f1b4723b3a306f9153da6503e1f8cec52f88ad10b55b6c509bd3d32f89109504ebc753a071f08c3b81930546ee8fd3a13cdc3686ec956b6f7415f
6
+ metadata.gz: 7fcc6d76752d03effbed8958845c2a7404cfd8b2c37b8784668600515ea50c481c00458d2026cfacfb35c0e61d1d9914c7f387d9f840e68470777798fd22a3e0
7
+ data.tar.gz: 4aa9f107d2627533cd3780d27ccebf7d6429ccee5d1e363d4ba2f87fd49807f91f844c12f43bf21f4f768c54c9d5a5e099c7fa2590d5afa20c3dd2c61e3a3e45
data/bin/aipim CHANGED
@@ -33,10 +33,13 @@ if ARGV[0] == 'generate'
33
33
  # jQuery
34
34
  system('cp '+path+'lib/assets/jquery-1.9.1.js aipim/html')
35
35
 
36
+ #Copia o arquivo de configuracao
37
+ system('cp -n '+path+'config/aipim.yml config')
38
+
36
39
  # resolucao padrão
37
40
  width = "1366"
38
41
  height = "768"
39
- screenshot = true
42
+
40
43
 
41
44
  # argumentos
42
45
  ARGV.each_with_index do |arg, i|
@@ -45,30 +48,24 @@ if ARGV[0] == 'generate'
45
48
  if ARGV[i] == '--resolution'
46
49
  width = ARGV[i+1].split("x")[0]
47
50
  height = ARGV[i+1].split("x")[1]
48
- # argumento do screenshot
49
- elsif ARGV[i] == '--no-screenshot'
50
- screenshot = false
51
51
  end
52
52
  end
53
53
  end
54
54
 
55
- if screenshot
56
- # le o arquivo de configuracao do screenshot
57
- f = File.open(path+'lib/webdriver/screenshot.rb', "r")
58
- # salva tudo numa string
59
- f_str = ""
60
- f.each_line {|line| f_str = f_str + line}
61
- # substitui os valores da resolucao
62
- f_str = f_str.gsub("SCREENSHOT_HEIGHT", height).gsub("SCREENSHOT_WIDTH", width)
63
- f.close
64
- # abre o arquivo de configuracao do screenshot na pasta do cucumber
65
- f = File.open("features/support/screenshot.rb", "w")
66
- # coloca a string nesse arquivo
67
- f.puts f_str
68
- f.close
69
- else
70
- system('rm -f features/support/screenshot.rb')
71
- end
55
+ # le o arquivo de configuracao do screenshot
56
+ f = File.open(path+'lib/webdriver/screenshot.rb', "r")
57
+ # salva tudo numa string
58
+ f_str = ""
59
+ f.each_line {|line| f_str = f_str + line}
60
+ # substitui os valores da resolucao
61
+ f_str = f_str.gsub("SCREENSHOT_HEIGHT", height).gsub("SCREENSHOT_WIDTH", width)
62
+ f.close
63
+ # abre o arquivo de configuracao do screenshot na pasta do cucumber
64
+ f = File.open("features/support/screenshot.rb", "w")
65
+ # coloca a string nesse arquivo
66
+ f.puts f_str
67
+ f.close
68
+
72
69
 
73
70
  elsif ARGV[0] == 'html'
74
71
  # remove os htmls antigos
@@ -86,4 +83,16 @@ elsif ARGV[0] == 'html'
86
83
  # geara o html das features
87
84
  Html.features(features)
88
85
 
89
- end
86
+
87
+ elsif ARGV[0] == '--screenshot'
88
+ config = YAML.load_file("config/aipim.yml")
89
+ config['screenshot'] = true
90
+ File.open("config/aipim.yml", 'w') {|file| file.write config.to_yaml } #Store
91
+
92
+
93
+ elsif ARGV[0] == '--no-screenshot'
94
+ config = YAML.load_file("config/aipim.yml")
95
+ config['screenshot'] = false
96
+ File.open("config/aipim.yml", 'w') {|file| file.write config.to_yaml } #Store
97
+
98
+ end
@@ -0,0 +1,2 @@
1
+ ---
2
+ screenshot: true
@@ -16,7 +16,9 @@ Before do |scenario|
16
16
  end
17
17
 
18
18
  After do
19
- if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript')) && !page.driver.browser.nil?
19
+ config = YAML.load_file("config/aipim.yml")
20
+
21
+ if (@ScenarioTags.include?('@screenshot') && @ScenarioTags.include?('@javascript') && !page.driver.browser.nil? && config['screenshot'])
20
22
  path = "aipim/screenshots/#{@FeatureFile}"
21
23
  system("mkdir -p #{path}")
22
24
 
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.174
4
+ version: 0.0.179
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facta TI
@@ -55,6 +55,7 @@ files:
55
55
  - lib/assets/costum.css
56
56
  - lib/assets/costum.js
57
57
  - lib/assets/header.html
58
+ - config/aipim.yml
58
59
  - bin/aipim
59
60
  homepage: http://rubygems.org/gems/aipim
60
61
  licenses:
@@ -76,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 2.0.7
80
+ rubygems_version: 2.0.3
80
81
  signing_key:
81
82
  specification_version: 4
82
83
  summary: Teste aipim