ruby_raider 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: 0c66fd583de74af317246ea90218c7306cf0c6d3c82536ce106efaed591cf359
4
- data.tar.gz: 962f0deece2ca62183537b042de8d647cea406fe80804439ce52b4bf784e1b60
3
+ metadata.gz: c4b79cdbe23fe8d98b28291b0efa3a5e7fc48c45c93eea5cf4cf2bf292a95510
4
+ data.tar.gz: cf8b06ae6e67de9613fa4be51b3eb0bb28b71739a503cbfabfc6a32c79ebb2a1
5
5
  SHA512:
6
- metadata.gz: 45f9eac127c36eda63c6e8eeda1a57dd47e0a6b3abb460c26898efeb193c5f989db422e2c2c9220c247bd8864783d7fc67adb19c3b12055138ed69936d0f3330
7
- data.tar.gz: f94466c813b35eae664643e8fa3124f00d301ad29ebd9e644328e80cb5c1eafe7d20ef04c06a718955c3b85e4824fde35589de4f2fb0e832a50793255dc83b6a
6
+ metadata.gz: 0a79ed5939da9fd789e6c3e67c2873c45b1222019640ba65283655d68286e9a96c8dbc8391aa1c18ad6a444870c894e57c769fc0ec74ff1106542a7d28d93875
7
+ data.tar.gz: 7c9c7ca6b505e3b3bb0b5717d9618bf635ce0bf25eab9d21e577046f19ca1bfdf538f5500d5dcd669acdd4efcf3c0bb73081c82c3b7c110422409ff18a8b4b64
@@ -29,5 +29,5 @@ gem 'rubocop'
29
29
  <%- if rspec? -%>
30
30
  gem 'rubocop-rspec'
31
31
  <%- end -%>
32
- gem 'ruby_raider', '~> 0.9.0'
32
+ gem 'ruby_raider', '~> 1.0.1'
33
33
  <%= ERB.new(File.read(File.expand_path('./partials/automation_gems.tt', __dir__))).result(binding).strip! %>
@@ -4,7 +4,7 @@ gem 'selenium-webdriver'
4
4
  gem 'watir'
5
5
  <% when selenium_based? %>
6
6
  gem 'selenium-webdriver'
7
- <% else %>
7
+ <% when mobile? %>
8
8
  gem 'appium_lib'
9
9
  gem 'appium_console'
10
10
  <% end %>
data/lib/plugin/plugin.rb CHANGED
@@ -28,6 +28,8 @@ module RubyRaider
28
28
  end
29
29
 
30
30
  def installed_plugins
31
+ return gemfile_guard unless File.exist?('Gemfile')
32
+
31
33
  parsed_gemfile = File.readlines('Gemfile').map { |line| line.sub('gem ', '').strip.delete("'") }
32
34
  parsed_gemfile.select { |line| plugins.include?(line) }
33
35
  end
@@ -51,6 +53,8 @@ module RubyRaider
51
53
  private
52
54
 
53
55
  def add_plugin_to_gemfile(plugin_name)
56
+ return gemfile_guard unless File.exist?('Gemfile')
57
+
54
58
  File.open('Gemfile', 'a') do |file|
55
59
  file.puts "\n# Ruby Raider Plugins\n" unless comment_present?
56
60
  file.puts "gem '#{plugin_name}'" unless plugin_present?(plugin_name)
@@ -67,6 +71,8 @@ module RubyRaider
67
71
  end
68
72
 
69
73
  def read_gemfile
74
+ return gemfile_guard unless File.exist?('Gemfile')
75
+
70
76
  File.readlines('Gemfile')
71
77
  end
72
78
 
@@ -86,10 +92,16 @@ module RubyRaider
86
92
 
87
93
  # :reek:NestedIterators { enabled: false }
88
94
  def update_gemfile(output_lines)
95
+ return gemfile_guard unless File.exist?('Gemfile')
96
+
89
97
  File.open('Gemfile', 'w') do |file|
90
98
  output_lines.each { |line| file.puts line }
91
99
  end
92
100
  end
101
+
102
+ def gemfile_guard
103
+ pp 'There is no Gemfile, please create one to install plugins'
104
+ end
93
105
  end
94
106
  end
95
107
  end
data/lib/version CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_raider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno