scide 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -11,21 +11,25 @@ GEM
11
11
  bundler (~> 1.0)
12
12
  git (>= 1.2.5)
13
13
  rake
14
- multi_json (1.0.3)
15
- paint (0.8.3)
16
- rake (0.9.2)
14
+ multi_json (1.1.0)
15
+ paint (0.8.4)
16
+ rake (0.9.2.2)
17
17
  rdiscount (1.6.8)
18
- rspec (2.6.0)
19
- rspec-core (~> 2.6.0)
20
- rspec-expectations (~> 2.6.0)
21
- rspec-mocks (~> 2.6.0)
22
- rspec-core (2.6.4)
23
- rspec-expectations (2.6.0)
18
+ rspec (2.8.0)
19
+ rspec-core (~> 2.8.0)
20
+ rspec-expectations (~> 2.8.0)
21
+ rspec-mocks (~> 2.8.0)
22
+ rspec-core (2.8.0)
23
+ rspec-expectations (2.8.0)
24
24
  diff-lcs (~> 1.1.2)
25
- rspec-mocks (2.6.0)
26
- shoulda (2.11.3)
27
- simplecov (0.5.3)
28
- multi_json (~> 1.0.3)
25
+ rspec-mocks (2.8.0)
26
+ shoulda (3.0.1)
27
+ shoulda-context (~> 1.0.0)
28
+ shoulda-matchers (~> 1.0.0)
29
+ shoulda-context (1.0.0)
30
+ shoulda-matchers (1.0.0)
31
+ simplecov (0.6.1)
32
+ multi_json (~> 1.0)
29
33
  simplecov-html (~> 0.5.3)
30
34
  simplecov-html (0.5.3)
31
35
  travis-lint (1.3.0)
@@ -33,7 +37,7 @@ GEM
33
37
  upoj-rb (0.0.5)
34
38
  active_support (>= 2)
35
39
  paint
36
- yard (0.7.2)
40
+ yard (0.7.5)
37
41
 
38
42
  PLATFORMS
39
43
  ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.10
1
+ 0.0.11
data/lib/scide/config.rb CHANGED
@@ -42,9 +42,7 @@ module Scide
42
42
  # * <tt>invalid_config</tt> - {#file} contains invalid configuration (see README).
43
43
  # * <tt>unexpected</tt> - {#file} could not be read.
44
44
  def load!
45
-
46
- Scide.fail :config_not_found, "ERROR: expected to find configuration at #{@file}" unless File.exists? @file
47
- Scide.fail :config_not_readable, "ERROR: configuration #{@file} is not readable" unless File.readable? @file
45
+ check_config
48
46
 
49
47
  begin
50
48
  raw_config = load_config
@@ -79,6 +77,14 @@ module Scide
79
77
 
80
78
  private
81
79
 
80
+ # Causes scide to fail with a <tt>config_not_found</tt> error if the configuration
81
+ # file does not exist, or with a <tt>config_not_readable</tt> error if it is not
82
+ # readable (see {Scide.fail}).
83
+ def check_config
84
+ Scide.fail :config_not_found, "ERROR: expected to find configuration at #{@file}" unless File.exists? @file
85
+ Scide.fail :config_not_readable, "ERROR: configuration #{@file} is not readable" unless File.readable? @file
86
+ end
87
+
82
88
  # Returns the contents of {#file}.
83
89
  def load_config
84
90
  File.open(@file, 'r').read
data/scide.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "scide"
8
- s.version = "0.0.10"
8
+ s.version = "0.0.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["AlphaHydrae"]
data/spec/config_spec.rb CHANGED
@@ -69,24 +69,28 @@ describe Scide::Config do
69
69
 
70
70
  it SpecHelper.should_fail(exit_on_fail, :invalid_config, "if the configuration is not a hash") do
71
71
  conf = Scide::Config.new
72
+ conf.stub!(:check_config){}
72
73
  conf.stub!(:load_config){ "- 'a'\n- 'b'" }
73
74
  load_should_fail(conf, :invalid_config)
74
75
  end
75
76
 
76
77
  it SpecHelper.should_fail(exit_on_fail, :invalid_config, "if the screen configuration is not a hash") do
77
78
  conf = Scide::Config.new
79
+ conf.stub!(:check_config){}
78
80
  conf.stub!(:load_config){ "screen:\n- 'a'\n- 'b'" }
79
81
  load_should_fail(conf, :invalid_config)
80
82
  end
81
83
 
82
84
  it SpecHelper.should_fail(exit_on_fail, :invalid_config, "if the projects configuration is not a hash") do
83
85
  conf = Scide::Config.new
86
+ conf.stub!(:check_config){}
84
87
  conf.stub!(:load_config){ "projects:\n- 'a'\n- 'b'" }
85
88
  load_should_fail(conf, :invalid_config)
86
89
  end
87
90
 
88
91
  it SpecHelper.should_fail(exit_on_fail, :invalid_config, "if the configuration is otherwise invalid") do
89
92
  conf = Scide::Config.new
93
+ conf.stub!(:check_config){}
90
94
  conf.stub!(:load_config){ "global:\n a: true\nprojects:\n a:\n - 'a'\n - 'b'" }
91
95
  load_should_fail(conf, :invalid_config)
92
96
  end
metadata CHANGED
@@ -1,124 +1,164 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: scide
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.10
3
+ version: !ruby/object:Gem::Version
4
+ hash: 9
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 11
10
+ version: 0.0.11
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - AlphaHydrae
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-03-09 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: upoj-rb
16
- requirement: &70104898182100 !ruby/object:Gem::Requirement
17
+
18
+ date: 2012-03-09 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
22
  none: false
18
- requirements:
23
+ requirements:
19
24
  - - ~>
20
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ hash: 23
27
+ segments:
28
+ - 0
29
+ - 0
30
+ - 4
21
31
  version: 0.0.4
22
- type: :runtime
32
+ name: upoj-rb
23
33
  prerelease: false
24
- version_requirements: *70104898182100
25
- - !ruby/object:Gem::Dependency
26
- name: rspec
27
- requirement: &70104898181200 !ruby/object:Gem::Requirement
34
+ type: :runtime
35
+ requirement: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :development
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ name: rspec
34
47
  prerelease: false
35
- version_requirements: *70104898181200
36
- - !ruby/object:Gem::Dependency
37
- name: shoulda
38
- requirement: &70104898180220 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
44
48
  type: :development
45
- prerelease: false
46
- version_requirements: *70104898180220
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: &70104898174160 !ruby/object:Gem::Requirement
49
+ requirement: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
50
52
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ name: shoulda
61
+ prerelease: false
55
62
  type: :development
63
+ requirement: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ version_requirements: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ name: bundler
56
75
  prerelease: false
57
- version_requirements: *70104898174160
58
- - !ruby/object:Gem::Dependency
59
- name: jeweler
60
- requirement: &70104898172460 !ruby/object:Gem::Requirement
76
+ type: :development
77
+ requirement: *id004
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: &id005 !ruby/object:Gem::Requirement
61
80
  none: false
62
- requirements:
81
+ requirements:
63
82
  - - ~>
64
- - !ruby/object:Gem::Version
83
+ - !ruby/object:Gem::Version
84
+ hash: 7
85
+ segments:
86
+ - 1
87
+ - 6
88
+ - 4
65
89
  version: 1.6.4
66
- type: :development
90
+ name: jeweler
67
91
  prerelease: false
68
- version_requirements: *70104898172460
69
- - !ruby/object:Gem::Dependency
70
- name: simplecov
71
- requirement: &70104898171140 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
92
  type: :development
78
- prerelease: false
79
- version_requirements: *70104898171140
80
- - !ruby/object:Gem::Dependency
81
- name: yard
82
- requirement: &70104898170080 !ruby/object:Gem::Requirement
93
+ requirement: *id005
94
+ - !ruby/object:Gem::Dependency
95
+ version_requirements: &id006 !ruby/object:Gem::Requirement
83
96
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ hash: 3
101
+ segments:
102
+ - 0
103
+ version: "0"
104
+ name: simplecov
89
105
  prerelease: false
90
- version_requirements: *70104898170080
91
- - !ruby/object:Gem::Dependency
92
- name: rdiscount
93
- requirement: &70104898168420 !ruby/object:Gem::Requirement
106
+ type: :development
107
+ requirement: *id006
108
+ - !ruby/object:Gem::Dependency
109
+ version_requirements: &id007 !ruby/object:Gem::Requirement
94
110
  none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
117
+ version: "0"
118
+ name: yard
119
+ prerelease: false
99
120
  type: :development
121
+ requirement: *id007
122
+ - !ruby/object:Gem::Dependency
123
+ version_requirements: &id008 !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ name: rdiscount
100
133
  prerelease: false
101
- version_requirements: *70104898168420
102
- - !ruby/object:Gem::Dependency
103
- name: travis-lint
104
- requirement: &70104898167160 !ruby/object:Gem::Requirement
134
+ type: :development
135
+ requirement: *id008
136
+ - !ruby/object:Gem::Dependency
137
+ version_requirements: &id009 !ruby/object:Gem::Requirement
105
138
  none: false
106
- requirements:
139
+ requirements:
107
140
  - - ~>
108
- - !ruby/object:Gem::Version
141
+ - !ruby/object:Gem::Version
142
+ hash: 27
143
+ segments:
144
+ - 1
145
+ - 3
146
+ - 0
109
147
  version: 1.3.0
110
- type: :development
148
+ name: travis-lint
111
149
  prerelease: false
112
- version_requirements: *70104898167160
150
+ type: :development
151
+ requirement: *id009
113
152
  description: Utility to generate GNU screen configuration files.
114
153
  email: hydrae.alpha@gmail.com
115
- executables:
154
+ executables:
116
155
  - scide
117
156
  extensions: []
118
- extra_rdoc_files:
157
+
158
+ extra_rdoc_files:
119
159
  - LICENSE.txt
120
160
  - README.md
121
- files:
161
+ files:
122
162
  - .document
123
163
  - .rspec
124
164
  - .rvmrc
@@ -164,31 +204,37 @@ files:
164
204
  - spec/version_spec.rb
165
205
  - spec/window_spec.rb
166
206
  homepage: http://github.com/AlphaHydrae/scide
167
- licenses:
207
+ licenses:
168
208
  - MIT
169
209
  post_install_message:
170
210
  rdoc_options: []
171
- require_paths:
211
+
212
+ require_paths:
172
213
  - lib
173
- required_ruby_version: !ruby/object:Gem::Requirement
214
+ required_ruby_version: !ruby/object:Gem::Requirement
174
215
  none: false
175
- requirements:
176
- - - ! '>='
177
- - !ruby/object:Gem::Version
178
- version: '0'
179
- segments:
216
+ requirements:
217
+ - - ">="
218
+ - !ruby/object:Gem::Version
219
+ hash: 3
220
+ segments:
180
221
  - 0
181
- hash: -124737632827864702
182
- required_rubygems_version: !ruby/object:Gem::Requirement
222
+ version: "0"
223
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
224
  none: false
184
- requirements:
185
- - - ! '>='
186
- - !ruby/object:Gem::Version
187
- version: '0'
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ hash: 3
229
+ segments:
230
+ - 0
231
+ version: "0"
188
232
  requirements: []
233
+
189
234
  rubyforge_project:
190
235
  rubygems_version: 1.8.17
191
236
  signing_key:
192
237
  specification_version: 3
193
238
  summary: GNU Screen IDE.
194
239
  test_files: []
240
+