trackman 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/trackman.rb +10 -14
- data/lib/trackman/assets.rb +10 -6
- data/lib/trackman/assets/asset.rb +3 -6
- data/lib/trackman/assets/asset_factory.rb +3 -3
- data/lib/trackman/assets/bundled_asset.rb +1 -1
- data/lib/trackman/assets/persistence.rb +1 -3
- data/lib/trackman/components.rb +4 -5
- data/lib/trackman/errors.rb +3 -5
- data/lib/trackman/path.rb +3 -5
- data/lib/trackman/scaffold.rb +1 -3
- data/lib/trackman/utility.rb +1 -5
- data/lib/trackman/utility/configuration.rb +1 -1
- data/lib/trackman/utility/debugger.rb +20 -2
- data/lib/trackman/utility/railtie.rb +2 -2
- data/lib/trackman/version.rb +1 -1
- data/rails_generators/trackman_tasks/templates/trackman.rake +1 -3
- metadata +2 -2
data/lib/trackman.rb
CHANGED
@@ -1,20 +1,16 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
3
|
|
4
|
-
require File.expand_path(
|
5
|
-
require File.expand_path('../trackman/utility/railtie', __FILE__)
|
4
|
+
require File.expand_path("../trackman/utility/core_extensions", __FILE__)
|
6
5
|
|
7
6
|
module Trackman
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
7
|
+
autoload :Assets, 'trackman/assets'
|
8
|
+
autoload :Scaffold, 'trackman/scaffold'
|
9
|
+
autoload :Components, 'trackman/components'
|
10
|
+
autoload :Errors, 'trackman/errors'
|
11
|
+
autoload :Path, 'trackman/path'
|
12
|
+
autoload :Utility, 'trackman/utility'
|
13
|
+
end
|
18
14
|
|
19
|
-
|
20
|
-
|
15
|
+
require File.expand_path("../trackman/utility/debugger", __FILE__)
|
16
|
+
require File.expand_path("../trackman/utility/railtie", __FILE__)
|
data/lib/trackman/assets.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
module Trackman
|
2
2
|
module Assets
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
autoload :Asset, 'trackman/assets/asset'
|
4
|
+
autoload :HtmlAsset, 'trackman/assets/html_asset'
|
5
|
+
autoload :RemoteAsset, 'trackman/assets/remote_asset'
|
6
|
+
autoload :CssAsset, 'trackman/assets/css_asset'
|
7
|
+
|
8
|
+
autoload :CompositeAsset, 'trackman/assets/composite_asset'
|
9
|
+
autoload :AssetFactory, 'trackman/assets/asset_factory'
|
10
|
+
autoload :BundledAsset, 'trackman/assets/bundled_asset'
|
11
|
+
autoload :RemoteAssetFactory, 'trackman/assets/remote_asset_factory'
|
12
|
+
autoload :Persistence, 'trackman/assets/persistence'
|
9
13
|
end
|
10
14
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Trackman
|
2
2
|
module Assets
|
3
3
|
class Asset
|
4
|
-
extend AssetFactory, Components::Conventions
|
5
|
-
extend Components::Diffable, Components::Shippable
|
4
|
+
extend AssetFactory, Trackman::Components::Conventions
|
5
|
+
extend Trackman::Components::Diffable, Trackman::Components::Shippable
|
6
6
|
include Comparable
|
7
7
|
|
8
8
|
def initialize attributes = {}
|
@@ -65,10 +65,7 @@ module Trackman
|
|
65
65
|
local = Asset.all
|
66
66
|
remote = RemoteAsset.all
|
67
67
|
|
68
|
-
diff_result = diff(local, remote)
|
69
|
-
|
70
|
-
Trackman::Utility::Debugger.trace diff_result.inspect
|
71
|
-
|
68
|
+
diff_result = diff(local, remote)
|
72
69
|
ship diff_result
|
73
70
|
|
74
71
|
true
|
@@ -20,12 +20,12 @@ module Trackman
|
|
20
20
|
|
21
21
|
def add_content_behavior instance
|
22
22
|
if asset_pipeline_enabled?
|
23
|
-
instance.extend Path::Rails32Resolver, BundledAsset
|
23
|
+
instance.extend Trackman::Path::Rails32Resolver, BundledAsset
|
24
24
|
return instance
|
25
25
|
elsif rails_defined? #fallback to rails without asset pipeline
|
26
|
-
instance.extend Path::RailsResolver
|
26
|
+
instance.extend Trackman::Path::RailsResolver
|
27
27
|
end
|
28
|
-
instance.extend Components::Hashable
|
28
|
+
instance.extend Trackman::Components::Hashable
|
29
29
|
|
30
30
|
instance
|
31
31
|
end
|
data/lib/trackman/components.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module Trackman
|
2
2
|
module Components
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
3
|
+
autoload :Conventions, 'trackman/components/conventions'
|
4
|
+
autoload :Diffable, 'trackman/components/diffable'
|
5
|
+
autoload :Hashable, 'trackman/components/hashable'
|
6
|
+
autoload :Shippable, 'trackman/components/shippable'
|
8
7
|
end
|
9
8
|
end
|
data/lib/trackman/errors.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
module Trackman
|
2
2
|
module Errors
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
autoload s, p
|
7
|
-
end
|
3
|
+
autoload :AssetNotFoundError, 'trackman/errors/asset_not_found_error'
|
4
|
+
autoload :ConfigNotFoundError, 'trackman/errors/config_not_found_error'
|
5
|
+
autoload :ConfigSetupError, 'trackman/errors/config_setup_error'
|
8
6
|
end
|
9
7
|
end
|
data/lib/trackman/path.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
module Trackman
|
2
2
|
module Path
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
autoload s, p
|
7
|
-
end
|
3
|
+
autoload :Resolver, 'trackman/path/resolver'
|
4
|
+
autoload :Rails32Resolver, 'trackman/path/rails32_resolver'
|
5
|
+
autoload :RailsResolver, 'trackman/path/rails_resolver'
|
8
6
|
end
|
9
7
|
end
|
data/lib/trackman/scaffold.rb
CHANGED
data/lib/trackman/utility.rb
CHANGED
@@ -7,7 +7,7 @@ module Trackman
|
|
7
7
|
@@server_url = ENV['TRACKMAN_URL']
|
8
8
|
|
9
9
|
def self.debug_mode?
|
10
|
-
|
10
|
+
@@debug ||= ENV['TRACKMAN_DEBUG_MODE'] == 'true'
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.trace data
|
@@ -20,5 +20,23 @@ module Trackman
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
+
if Trackman::Utility::Debugger.debug_mode?
|
24
|
+
RestClient.log = Logger.new(STDOUT)
|
23
25
|
|
24
|
-
|
26
|
+
#loads module first
|
27
|
+
Trackman::Components::Diffable
|
28
|
+
|
29
|
+
module Trackman
|
30
|
+
module Components
|
31
|
+
module Diffable
|
32
|
+
alias old_diff diff
|
33
|
+
|
34
|
+
def diff local, remote
|
35
|
+
result = old_diff local, remote
|
36
|
+
Trackman::Utility::Debugger.trace "Diff result:\n#{result.inspect}"
|
37
|
+
result
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -19,8 +19,8 @@ if defined?(Rails)
|
|
19
19
|
module Trackman
|
20
20
|
class Railtie < Rails::Railtie
|
21
21
|
rake_tasks do
|
22
|
-
path = '
|
23
|
-
|
22
|
+
path = File.expand_path('../../../../rails_generators/trackman_tasks/templates/trackman.rake', __FILE__)
|
23
|
+
load path
|
24
24
|
end
|
25
25
|
|
26
26
|
initializer "trackman.hook" do |app|
|
data/lib/trackman/version.rb
CHANGED
@@ -4,14 +4,12 @@ require 'trackman'
|
|
4
4
|
namespace :trackman do
|
5
5
|
desc "Syncs your assets with the server, this is what gets executed when you deploy to heroku."
|
6
6
|
task :sync => :environment do
|
7
|
-
RestClient.log = Logger.new(STDOUT) if Debugger.debug_mode?
|
8
|
-
|
9
7
|
Trackman::Assets::Asset.sync
|
10
8
|
end
|
11
9
|
|
12
10
|
desc "Sets up the heroku configs required by Trackman"
|
13
11
|
task :setup, :app do |t, args|
|
14
12
|
heroku_version = Gem.loaded_specs["heroku"].version.to_s
|
15
|
-
Trackman::Configuration.new(heroku_version, :app => args[:app]).setup
|
13
|
+
Trackman::Utility::Configuration.new(heroku_version, :app => args[:app]).setup
|
16
14
|
end
|
17
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|