ruby_raider 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2cbd602b0c6fa72ff1e5d3b84ddc3c847e5257fceae9781f8165a81bc76d1a3
4
- data.tar.gz: 6fd1e508cce664cc5320fce27c02fc293239a6f8bd1dc2c3086fd4aa872522cb
3
+ metadata.gz: c0bace14246d3e24dce83a371be3cd3b5149e7613a2f467e5258cf08f4f429c5
4
+ data.tar.gz: 25ff01178be1c28a0f8f183bbb7e1364b6205a0f941f6166e7b87281e36c7ba7
5
5
  SHA512:
6
- metadata.gz: 6c3b23442dc4e9794d250f0b6f55d30d2ab12558ddadb9f2a7df1d3bdb308ace5ef177469ef742c2a862aa4c7ae9f49fe5cf47f701eb448b3d919c63717f0d5d
7
- data.tar.gz: ab97943342749bed0e721ba435995505c5dc356b9b85a80b666295babac0ddaa95d0bfd03d2889a619ad432f0b09810e71cbe4b63a2762764f4a12da383b02df
6
+ metadata.gz: 06372caf14ab5bf242cdf8a87843e1e4ccc078f7f65542580fb5c793f0c679834050f5661a6554c52bde84d95f63bf90f8db276f10d9e4c4563093ea83ac9702
7
+ data.tar.gz: 2b4ddad1c0743eb57f3b051c1c5abb7d28923b0a0f7fb2fa24309b9b357894b5e0257b721aa9e5a9e4986ad3bba02494a8328295a9a42f8237e0ed5c1252ad21
@@ -9,6 +9,11 @@ class RunnerComponents < BaseComponent
9
9
  CONFIG_ITEM = Struct.new(:attribute, :value)
10
10
  CAP = Struct.new(:attribute, :value)
11
11
 
12
+ def initialize
13
+ super
14
+ @folder_exist = File.directory?(@folder)
15
+ end
16
+
12
17
  def header
13
18
  grid do
14
19
  stretchy false
@@ -60,7 +65,8 @@ class RunnerComponents < BaseComponent
60
65
  tab_item('Tests') do
61
66
  horizontal_box do
62
67
  @text_box = multiline_entry do
63
- text @file.read
68
+ test_code = @folder_exist ? @file.read : 'No tests have been created, please create your first test'
69
+ text test_code
64
70
 
65
71
  on_changed do |e|
66
72
  File.write(@tests.selected_item, e.text)
@@ -133,24 +139,28 @@ class RunnerComponents < BaseComponent
133
139
  end
134
140
  vertical_box do
135
141
  @editable_files = combobox do
136
- @all_files = load_all_files
142
+ @all_files = @folder_exist ? load_all_files : ['There are no files created']
137
143
  stretchy false
138
144
  visible true
139
145
  items @all_files
140
146
  selected_item @all_files.first
141
147
 
142
148
  on_selected do |items|
143
- path = items.selected_item
144
- @edit_file = File.open(path)
145
- @edit_box.text = @edit_file.read
149
+ if @folder_exist
150
+ path = items.selected_item
151
+ @edit_file = File.open(path)
152
+ @edit_box.text = @edit_file.read
153
+ end
146
154
  end
147
155
  end
148
156
  @edit_box = multiline_entry do
149
- text File.read(@all_files.first)
157
+ text File.read(@all_files.first) if @folder_exist
150
158
 
151
159
  on_changed do |e|
152
- File.write(@editable_files.selected_item, e.text)
153
- $stdout.flush # for Windows
160
+ if @folder_exist
161
+ File.write(@editable_files.selected_item, e.text)
162
+ $stdout.flush # for Windows
163
+ end
154
164
  end
155
165
  end
156
166
  end
@@ -26,7 +26,7 @@ gem 'rubocop'
26
26
  <% if framework == 'rspec' -%>
27
27
  gem 'rubocop-rspec'
28
28
  <% end -%>
29
- gem 'ruby_raider'
29
+ gem 'ruby_raider', '~> 0.6.2'
30
30
  <%= ERB.new(File.read(File.expand_path('./partials/automation_gems.tt', __dir__))).result(binding).strip! %>
31
31
  <% if %w[selenium watir].include? automation -%>
32
32
  gem 'webdrivers'
data/ruby_raider.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ruby_raider'
5
- s.version = '0.6.1'
5
+ s.version = '0.6.2'
6
6
  s.summary = 'A gem to make setup and start of UI automation projects easier'
7
7
  s.description = 'This gem has everything you need to start working with test automation'
8
8
  s.authors = ['Agustin Pequeno']
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: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno