tracco 0.0.17 → 0.0.18

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.0.18 / 2013-03-17
2
+ ==================
3
+ * improving tracco initialize command
4
+ * rewriting Tracco::CLI to be able to fetch templates from the gem
5
+ * updating gems
6
+
1
7
  0.0.17 / 2013-03-15
2
8
  ==================
3
9
  * migrating all the rake tasks to bin executables. Still leaving the rake task, marking them as DEPRECATED though
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tracco (0.0.17)
4
+ tracco (0.0.18)
5
5
  bson_ext
6
6
  chronic
7
7
  google_drive
@@ -29,12 +29,11 @@ GEM
29
29
  chronic (0.9.1)
30
30
  columnize (0.3.6)
31
31
  database_cleaner (0.9.1)
32
- debugger (1.4.0)
32
+ debugger (1.5.0)
33
33
  columnize (>= 0.3.1)
34
- debugger-linecache (~> 1.1.1)
34
+ debugger-linecache (~> 1.2.0)
35
35
  debugger-ruby_core_source (~> 1.2.0)
36
- debugger-linecache (1.1.2)
37
- debugger-ruby_core_source (>= 1.1.1)
36
+ debugger-linecache (1.2.0)
38
37
  debugger-ruby_core_source (1.2.0)
39
38
  diff-lcs (1.2.1)
40
39
  factory_girl (4.2.0)
@@ -49,7 +48,7 @@ GEM
49
48
  httpauth (0.2.0)
50
49
  i18n (0.6.4)
51
50
  json (1.7.7)
52
- jwt (0.1.7)
51
+ jwt (0.1.8)
53
52
  multi_json (>= 1.5)
54
53
  mime-types (1.21)
55
54
  mongoid (3.1.2)
@@ -84,7 +83,7 @@ GEM
84
83
  rspec-core (~> 2.13.0)
85
84
  rspec-expectations (~> 2.13.0)
86
85
  rspec-mocks (~> 2.13.0)
87
- rspec-core (2.13.0)
86
+ rspec-core (2.13.1)
88
87
  rspec-expectations (2.13.0)
89
88
  diff-lcs (>= 1.1.3, < 2.0)
90
89
  rspec-mocks (2.13.0)
@@ -99,7 +98,7 @@ GEM
99
98
  simplecov-html (~> 0.7.1)
100
99
  simplecov-html (0.7.1)
101
100
  thor (0.17.0)
102
- tzinfo (0.3.36)
101
+ tzinfo (0.3.37)
103
102
 
104
103
  PLATFORMS
105
104
  ruby
@@ -2,7 +2,6 @@ require 'trello'
2
2
  require 'rainbow'
3
3
  require 'chronic'
4
4
  require 'mongoid'
5
- require 'forwardable'
6
5
 
7
6
  require 'tracco/configuration'
8
7
 
@@ -52,14 +52,13 @@ module Tracco
52
52
 
53
53
  desc "initialize", "Copy template configuration files"
54
54
  def init
55
- Dir.glob("config/*.template.yml").each do |file|
56
- template_file = File.basename(file)
57
- target_file = template_file.sub('.template', '')
55
+ template_files.each do |template_file|
56
+ target_file = File.basename(template_file).sub('.template', '')
58
57
 
59
58
  if File.exists?(File.join('config', target_file))
60
59
  say "skipping #{target_file.color(:yellow)}, already exists."
61
60
  else
62
- copy_file File.join(CLI.source_root, template_file), File.join(CLI.source_root, target_file)
61
+ run "cp -f #{template_file} #{File.join(CLI.source_root, target_file)}"
63
62
  say "please edit the #{target_file} to have all the proper configurations"
64
63
  end
65
64
  end
@@ -143,5 +142,26 @@ module Tracco
143
142
  def error_invalid_environment(environment)
144
143
  error("Invalid environment specified: #{environment}")
145
144
  end
145
+
146
+ def template_files
147
+ local_templates = Dir.glob("config/*.template.yml")
148
+ if local_templates.empty?
149
+ templates_from_gem
150
+ else
151
+ local_templates
152
+ end
153
+ end
154
+
155
+ def templates_from_gem
156
+ Dir.glob("#{tracco_gem.full_gem_path}/config/*.template.yml")
157
+ end
158
+
159
+ def tracco_gem
160
+ if Gem::Specification.respond_to?(:find_by_name)
161
+ Gem::Specification.find_by_name('tracco')
162
+ else
163
+ Gem.searcher.find('tracco')
164
+ end
165
+ end
146
166
  end
147
167
  end
@@ -14,7 +14,7 @@ module Tracco
14
14
  Database.load_env(environment || "development", ENV['MONGOID_CONFIG_PATH'])
15
15
  rescue Errno::ENOENT => e
16
16
  Trello.logger.warn e.message
17
- Trello.logger.warn "try running 'rake prepare'"
17
+ Trello.logger.warn "try running 'tracco --initialize'"
18
18
  end
19
19
  end
20
20
 
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  module Tracco
2
4
  module Tracking
3
5
  module Base
@@ -1,3 +1,3 @@
1
1
  module Tracco
2
- VERSION = '0.0.17'
2
+ VERSION = '0.0.18'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-15 00:00:00.000000000 Z
12
+ date: 2013-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-trello
@@ -261,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  segments:
263
263
  - 0
264
- hash: 2030524429048154611
264
+ hash: 1576882713862279228
265
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  none: false
267
267
  requirements: