hw 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hw.rb CHANGED
@@ -5,14 +5,6 @@ require 'httparty'
5
5
  require 'active_support/all'
6
6
  require 'rails/generators/actions'
7
7
 
8
- require 'hw/core_ext/string'
9
- require 'hw/version'
10
- require 'hw/actions'
11
- require 'hw/thor'
12
- require 'hw/sources'
13
- require 'hw/packages'
14
- require 'hw/cli'
15
-
16
8
  module HW
17
9
  DEFAULT_SOURCE = "git@github.com:carrot/hw-packages.git" # CLI
18
10
  DIRECTORY = File.expand_path("~/.hw/") # CLI, HW
@@ -21,3 +13,10 @@ module HW
21
13
  RESERVED_WORDS = %w(help) # Packages
22
14
  end
23
15
 
16
+ require 'hw/core_ext/string'
17
+ require 'hw/version'
18
+ require 'hw/actions'
19
+ require 'hw/thor'
20
+ require 'hw/sources'
21
+ require 'hw/packages'
22
+ require 'hw/cli'
@@ -5,7 +5,7 @@ module HW::Packages
5
5
 
6
6
  def add name
7
7
  HW::Sources.all.keys.each do |directory|
8
- full_path = File.join(SOURCES_PATH, directory, "#{name}.rb")
8
+ full_path = File.join(HW::SOURCES_PATH, directory, "#{name}.rb")
9
9
  @@packages[name] = full_path if File.exists?(full_path)
10
10
  end
11
11
 
@@ -28,7 +28,7 @@ module HW::Packages
28
28
 
29
29
  def list
30
30
  HW::Sources.all.keys.each do |directory|
31
- full_path = File.join(SOURCES_PATH, directory, "*.rb")
31
+ full_path = File.join(HW::SOURCES_PATH, directory, "*.rb")
32
32
 
33
33
  Dir[full_path].each do |file|
34
34
  key = File.basename(file, '.rb')
@@ -41,6 +41,6 @@ module HW::Packages
41
41
  end
42
42
 
43
43
  def reserved? name
44
- RESERVED_WORDS.include?(name.downcase)
44
+ HW::RESERVED_WORDS.include?(name.downcase)
45
45
  end
46
46
  end
@@ -3,12 +3,12 @@ require 'thor/actions'
3
3
  module HW::Sources
4
4
  extend self
5
5
 
6
- @@sources = {}
7
- @@default_source = "git@github.com:carrot/hw-packages.git"
6
+ @@sources = {}
7
+ @@default_source = "git@github.com:carrot/hw-packages.git"
8
8
 
9
9
  def all
10
- if File.exists? CONFIG_PATH
11
- File.readlines(CONFIG_PATH).each do |line|
10
+ if File.exists? HW::CONFIG_PATH
11
+ File.readlines(HW::CONFIG_PATH).each do |line|
12
12
  source = line.split("=")
13
13
  path = source[1].strip
14
14
  path = File.expand_path(path) if local_source?(path)
@@ -36,40 +36,3 @@ module HW::Sources
36
36
  (path =~ git_regex).nil?
37
37
  end
38
38
  end
39
-
40
-
41
-
42
- # module HW::Sources
43
- # @@sources = {}
44
- # @@default_source = "git@github.com:carrot/hw-packages.git"
45
-
46
- # def self.all
47
- # if File.exists? CONFIG_PATH
48
- # File.readlines(CONFIG_PATH).each do |line|
49
- # source = line.split("=")
50
- # path = source[1].strip
51
- # path = File.expand_path(path) if self.local_source?(path)
52
- # @@sources[source[0]] = path
53
- # end
54
- # end
55
-
56
- # @@sources
57
- # end
58
-
59
- # def self.add
60
- # # TODO: Currently a part of the System package
61
- # end
62
-
63
- # def self.git_clone
64
- # # TODO: Clone git repo
65
- # end
66
-
67
- # def self.git_pull
68
- # # TODO: Pull changes from git repo
69
- # end
70
-
71
- # def self.local_source? path
72
- # git_regex = /([A-Za-z0-9]+@|http(|s)\:\/\/)([A-Za-z0-9.]+)(:|\/)([A-Za-z0-9\-\/]+)/
73
- # (path =~ git_regex).nil?
74
- # end
75
- # end
@@ -1,3 +1,8 @@
1
1
  module HW
2
- VERSION = "1.1.1"
2
+ MAJOR = 1
3
+ MINOR = 1
4
+ TINY = 2
5
+ PRE = nil
6
+
7
+ VERSION = [MAJOR, MINOR, TINY, PRE].compact.join('.')
3
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hw
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-21 00:00:00.000000000 Z
12
+ date: 2013-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: &70239363443520 !ruby/object:Gem::Requirement
16
+ requirement: &70142601350240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70239363443520
24
+ version_requirements: *70142601350240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70239363459380 !ruby/object:Gem::Requirement
27
+ requirement: &70142601349720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '2.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70239363459380
38
+ version_requirements: *70142601349720
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rails
41
- requirement: &70239363458700 !ruby/object:Gem::Requirement
41
+ requirement: &70142601349040 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *70239363458700
49
+ version_requirements: *70142601349040
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rake
52
- requirement: &70239363458240 !ruby/object:Gem::Requirement
52
+ requirement: &70142601348580 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '0'
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *70239363458240
60
+ version_requirements: *70142601348580
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: httparty
63
- requirement: &70239363457820 !ruby/object:Gem::Requirement
63
+ requirement: &70142601348160 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '0'
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *70239363457820
71
+ version_requirements: *70142601348160
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: pg
74
- requirement: &70239363457400 !ruby/object:Gem::Requirement
74
+ requirement: &70142601347740 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: '0'
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *70239363457400
82
+ version_requirements: *70142601347740
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: git
85
- requirement: &70239363456980 !ruby/object:Gem::Requirement
85
+ requirement: &70142601347320 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *70239363456980
93
+ version_requirements: *70142601347320
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: rspec-rails
96
- requirement: &70239363456560 !ruby/object:Gem::Requirement
96
+ requirement: &70142601363260 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *70239363456560
104
+ version_requirements: *70142601363260
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: ruby-prof
107
- requirement: &70239363456140 !ruby/object:Gem::Requirement
107
+ requirement: &70142601362840 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0'
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *70239363456140
115
+ version_requirements: *70142601362840
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: debugger
118
- requirement: &70239363455720 !ruby/object:Gem::Requirement
118
+ requirement: &70142601362420 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *70239363455720
126
+ version_requirements: *70142601362420
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: ronn
129
- requirement: &70239363455300 !ruby/object:Gem::Requirement
129
+ requirement: &70142601362000 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: '0'
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *70239363455300
137
+ version_requirements: *70142601362000
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rspec
140
- requirement: &70239363454800 !ruby/object:Gem::Requirement
140
+ requirement: &70142601361500 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ~>
@@ -145,10 +145,10 @@ dependencies:
145
145
  version: '2.11'
146
146
  type: :development
147
147
  prerelease: false
148
- version_requirements: *70239363454800
148
+ version_requirements: *70142601361500
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: pry
151
- requirement: &70239363454380 !ruby/object:Gem::Requirement
151
+ requirement: &70142601361080 !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ! '>='
@@ -156,10 +156,10 @@ dependencies:
156
156
  version: '0'
157
157
  type: :development
158
158
  prerelease: false
159
- version_requirements: *70239363454380
159
+ version_requirements: *70142601361080
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: sqlite3
162
- requirement: &70239363453920 !ruby/object:Gem::Requirement
162
+ requirement: &70142601360620 !ruby/object:Gem::Requirement
163
163
  none: false
164
164
  requirements:
165
165
  - - ! '>='
@@ -167,7 +167,7 @@ dependencies:
167
167
  version: '0'
168
168
  type: :development
169
169
  prerelease: false
170
- version_requirements: *70239363453920
170
+ version_requirements: *70142601360620
171
171
  description: Package manager for random tasks
172
172
  email:
173
173
  - tmilewski@gmail.com