relish 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,14 +7,14 @@ module Relish
7
7
  attr_writer name
8
8
  class_eval %{
9
9
  def #{name} # def global_options_file
10
- @#{name.to_s} ||= # @global_options_file ||=
11
- ENV['RELISH_#{name.to_s.upcase}'] || # ENV['RELISH_GLOBAL_OPTIONS_FILE'] ||
10
+ @#{name.to_s} ||= # @global_options_file ||=
11
+ ENV['RELISH_#{name.to_s.upcase}'] || # ENV['RELISH_GLOBAL_OPTIONS_FILE'] ||
12
12
  '#{value}' # '~/.relish'
13
13
  end # end
14
14
  }
15
15
  end
16
16
 
17
- setting :global_options_file, File.join(File.expand_path('~'), '.relish')
17
+ setting :global_options_file, (File.join(File.expand_path('~'), '.relish') rescue '~/.relish')
18
18
  setting :local_options_file, '.relish'
19
19
  setting :default_host, 'api.relishapp.com'
20
20
  setting :default_ssl, 'on'
@@ -1,6 +1,6 @@
1
1
  module Relish
2
2
  module Version
3
- STRING = '0.5.2'
3
+ STRING = '0.5.3'
4
4
  end
5
5
  end
6
6
 
@@ -1,10 +1,28 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Relish do
4
+
4
5
  it "has a .global_options_file setting" do
5
6
  Relish.global_options_file.should_not be_nil
6
7
  end
7
-
8
+
9
+ context "when $HOME is not set" do
10
+ before do
11
+ @original_home = ENV['HOME']
12
+ ENV['HOME'] = nil
13
+ Object.send(:remove_const, :Relish)
14
+ load 'lib/relish.rb'
15
+ end
16
+
17
+ after do
18
+ ENV['HOME'] = @original_home
19
+ end
20
+
21
+ it "still returns the global_options file setting" do
22
+ Relish.global_options_file.should_not be_nil
23
+ end
24
+ end
25
+
8
26
  it "allows global_options_file to be overwritten" do
9
27
  Relish.global_options_file = 'foo'
10
28
  Relish.global_options_file.should == 'foo'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relish
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Wynne
@@ -16,10 +16,10 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-21 00:00:00 Z
19
+ date: 2011-10-09 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: json
22
+ type: :runtime
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
@@ -32,10 +32,10 @@ dependencies:
32
32
  - 4
33
33
  - 6
34
34
  version: 1.4.6
35
- type: :runtime
36
35
  version_requirements: *id001
36
+ name: json
37
37
  - !ruby/object:Gem::Dependency
38
- name: rest-client
38
+ type: :runtime
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
@@ -48,10 +48,10 @@ dependencies:
48
48
  - 6
49
49
  - 1
50
50
  version: 1.6.1
51
- type: :runtime
52
51
  version_requirements: *id002
52
+ name: rest-client
53
53
  - !ruby/object:Gem::Dependency
54
- name: archive-tar-minitar
54
+ type: :runtime
55
55
  prerelease: false
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
@@ -64,10 +64,10 @@ dependencies:
64
64
  - 5
65
65
  - 2
66
66
  version: 0.5.2
67
- type: :runtime
68
67
  version_requirements: *id003
68
+ name: archive-tar-minitar
69
69
  - !ruby/object:Gem::Dependency
70
- name: fakeweb
70
+ type: :development
71
71
  prerelease: false
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
@@ -80,10 +80,10 @@ dependencies:
80
80
  - 3
81
81
  - 0
82
82
  version: 1.3.0
83
- type: :development
84
83
  version_requirements: *id004
84
+ name: fakeweb
85
85
  - !ruby/object:Gem::Dependency
86
- name: rake
86
+ type: :development
87
87
  prerelease: false
88
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
@@ -96,10 +96,10 @@ dependencies:
96
96
  - 8
97
97
  - 7
98
98
  version: 0.8.7
99
- type: :development
100
99
  version_requirements: *id005
100
+ name: rake
101
101
  - !ruby/object:Gem::Dependency
102
- name: rspec
102
+ type: :development
103
103
  prerelease: false
104
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
105
  none: false
@@ -112,10 +112,10 @@ dependencies:
112
112
  - 6
113
113
  - 0
114
114
  version: 2.6.0
115
- type: :development
116
115
  version_requirements: *id006
116
+ name: rspec
117
117
  - !ruby/object:Gem::Dependency
118
- name: aruba
118
+ type: :development
119
119
  prerelease: false
120
120
  requirement: &id007 !ruby/object:Gem::Requirement
121
121
  none: false
@@ -128,10 +128,10 @@ dependencies:
128
128
  - 4
129
129
  - 5
130
130
  version: 0.4.5
131
- type: :development
132
131
  version_requirements: *id007
132
+ name: aruba
133
133
  - !ruby/object:Gem::Dependency
134
- name: bundler
134
+ type: :development
135
135
  prerelease: false
136
136
  requirement: &id008 !ruby/object:Gem::Requirement
137
137
  none: false
@@ -144,10 +144,10 @@ dependencies:
144
144
  - 0
145
145
  - 0
146
146
  version: 1.0.0
147
- type: :development
148
147
  version_requirements: *id008
148
+ name: bundler
149
149
  - !ruby/object:Gem::Dependency
150
- name: cucumber
150
+ type: :development
151
151
  prerelease: false
152
152
  requirement: &id009 !ruby/object:Gem::Requirement
153
153
  none: false
@@ -160,8 +160,8 @@ dependencies:
160
160
  - 0
161
161
  - 2
162
162
  version: 1.0.2
163
- type: :development
164
163
  version_requirements: *id009
164
+ name: cucumber
165
165
  description: Client gem for http://relishapp.com
166
166
  email: matt@mattwynne.net
167
167
  executables: