env 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -1,3 +1,9 @@
1
+ ### 0.2.0 / 2011-05-05
2
+
3
+ * Added {Env::Variables#timezone}.
4
+ * Added {Env::Variables#debug?}.
5
+ * Opt into [test.rubygems.org](http://test.rubygems.org/).
6
+
1
7
  ### 0.1.2 / 2011-01-23
2
8
 
3
9
  * Fixed {Env::Variables#home} to match the behavior of `Gem.find_home`.
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  * [Homepage](http://github.com/postmodern/env)
4
4
  * [Issues](http://github.com/postmodern/env/issues)
5
- * [Documentation](http://rubydoc.info/gems/env)
6
- * Postmodern (postmodern.mod3 at gmail.com)
5
+ * [Documentation](http://rubydoc.info/gems/env/frames)
6
+ * [Email](mailto:postmodern.mod3 at gmail.com)
7
7
 
8
8
  ## Description
9
9
 
@@ -23,6 +23,8 @@ Linux, BSD, OSX and Windows.
23
23
  * `EDITOR`
24
24
  * `BROWSER`
25
25
  * `LANG`
26
+ * `TZ`
27
+ * `DEBUG`
26
28
 
27
29
  ## Examples
28
30
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'ore-tasks', '~> 0.3.0'
5
+ gem 'ore-tasks', '~> 0.4'
6
6
  require 'ore/tasks'
7
7
 
8
8
  Ore::Tasks.new
@@ -12,7 +12,7 @@ rescue LoadError => e
12
12
  end
13
13
 
14
14
  begin
15
- gem 'rspec', '~> 2.4.0'
15
+ gem 'rspec', '~> 2.4'
16
16
  require 'rspec/core/rake_task'
17
17
 
18
18
  RSpec::Core::RakeTask.new
@@ -21,6 +21,7 @@ rescue LoadError => e
21
21
  abort "Please run `gem install rspec` to install RSpec."
22
22
  end
23
23
  end
24
+ task :test => :spec
24
25
  task :default => :spec
25
26
 
26
27
  begin
@@ -11,6 +11,6 @@ homepage: http://github.com/postmodern/env
11
11
  has_yard: true
12
12
 
13
13
  development_dependencies:
14
- ore-tasks: ~> 0.3.0
15
- rspec: ~> 2.4.0
14
+ ore-tasks: ~> 0.4
15
+ rspec: ~> 2.4
16
16
  yard: ~> 0.6.0
@@ -73,6 +73,18 @@ module Env
73
73
  end
74
74
  end
75
75
 
76
+ #
77
+ # The default timezone.
78
+ #
79
+ # @return [String, nil]
80
+ # The timezone name.
81
+ #
82
+ # @since 0.2.0
83
+ #
84
+ def timezone
85
+ env['TZ']
86
+ end
87
+
76
88
  #
77
89
  # The number of columns in the terminal.
78
90
  #
@@ -143,6 +155,18 @@ module Env
143
155
  env_hash['BROWSER']
144
156
  end
145
157
 
158
+ #
159
+ # Determines whether optional Debugging was enabled.
160
+ #
161
+ # @return [Boolean]
162
+ # Specifies whether the `DEBUG` variable was specified.
163
+ #
164
+ # @since 0.2.0
165
+ #
166
+ def debug?
167
+ true if env_hash['DEBUG']
168
+ end
169
+
146
170
  protected
147
171
 
148
172
  #
@@ -1,4 +1,4 @@
1
1
  module Env
2
2
  # env version
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2.0"
4
4
  end
@@ -1,4 +1,4 @@
1
- gem 'rspec', '~> 2.4.0'
1
+ gem 'rspec', '~> 2.4'
2
2
  require 'rspec'
3
3
  require 'env/version'
4
4
 
@@ -16,7 +16,8 @@ describe Variables do
16
16
  'LANG' => 'en_US.UTF8',
17
17
  'COLUMNS' => '80',
18
18
  'LINES' => '10',
19
- 'SHELL' => '/bin/bash'
19
+ 'SHELL' => '/bin/bash',
20
+ 'DEBUG' => '1'
20
21
  )
21
22
  end
22
23
 
@@ -96,4 +97,8 @@ describe Variables do
96
97
 
97
98
  subject.terminal.should == 'gnome-terminal'
98
99
  end
100
+
101
+ it "should check if DEBUG was set" do
102
+ subject.should be_debug
103
+ end
99
104
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
4
+ prerelease:
5
+ version: 0.2.0
10
6
  platform: ruby
11
7
  authors:
12
8
  - Postmodern
@@ -14,8 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-23 00:00:00 -08:00
18
- default_executable:
13
+ date: 2011-05-05 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: ore-tasks
@@ -25,11 +20,7 @@ dependencies:
25
20
  requirements:
26
21
  - - ~>
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 3
31
- - 0
32
- version: 0.3.0
23
+ version: "0.4"
33
24
  type: :development
34
25
  version_requirements: *id001
35
26
  - !ruby/object:Gem::Dependency
@@ -40,11 +31,7 @@ dependencies:
40
31
  requirements:
41
32
  - - ~>
42
33
  - !ruby/object:Gem::Version
43
- segments:
44
- - 2
45
- - 4
46
- - 0
47
- version: 2.4.0
34
+ version: "2.4"
48
35
  type: :development
49
36
  version_requirements: *id002
50
37
  - !ruby/object:Gem::Dependency
@@ -55,15 +42,12 @@ dependencies:
55
42
  requirements:
56
43
  - - ~>
57
44
  - !ruby/object:Gem::Version
58
- segments:
59
- - 0
60
- - 6
61
- - 0
62
45
  version: 0.6.0
63
46
  type: :development
64
47
  version_requirements: *id003
65
48
  description: Provides a Ruby interface to common environment variables, used on Windows, Linux, BSD and OSX.
66
- email: postmodern.mod3@gmail.com
49
+ email:
50
+ - postmodern.mod3@gmail.com
67
51
  executables: []
68
52
 
69
53
  extensions: []
@@ -74,6 +58,7 @@ extra_rdoc_files:
74
58
  - LICENSE.txt
75
59
  files:
76
60
  - .document
61
+ - .gemtest
77
62
  - .rspec
78
63
  - .yardopts
79
64
  - ChangeLog.md
@@ -89,7 +74,6 @@ files:
89
74
  - spec/env_spec.rb
90
75
  - spec/spec_helper.rb
91
76
  - spec/variables_spec.rb
92
- has_rdoc: yard
93
77
  homepage: http://github.com/postmodern/env
94
78
  licenses:
95
79
  - MIT
@@ -103,21 +87,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
87
  requirements:
104
88
  - - ">="
105
89
  - !ruby/object:Gem::Version
106
- segments:
107
- - 0
108
90
  version: "0"
109
91
  required_rubygems_version: !ruby/object:Gem::Requirement
110
92
  none: false
111
93
  requirements:
112
94
  - - ">="
113
95
  - !ruby/object:Gem::Version
114
- segments:
115
- - 0
116
96
  version: "0"
117
97
  requirements: []
118
98
 
119
99
  rubyforge_project: env
120
- rubygems_version: 1.3.7
100
+ rubygems_version: 1.8.0
121
101
  signing_key:
122
102
  specification_version: 3
123
103
  summary: Provides a Ruby interface to common environment variables