trackman 0.2.84 → 0.2.85

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.
@@ -18,7 +18,6 @@ if defined?(Rails) && Rails.env == "production"
18
18
  end
19
19
  end
20
20
 
21
-
22
21
  #ruby 1.8.7 does not take blocks (this fixes it) -- used in Asset.all
23
22
  if RUBY_VERSION !~ /^1\.9/
24
23
  class Array
@@ -10,18 +10,17 @@ module Trackman
10
10
  root = working_dir.realpath
11
11
 
12
12
  path = url
13
+
13
14
  path.slice! /^(\/assets|assets\/)/
14
15
  path = Pathname.new path
15
-
16
+
16
17
  if path.relative?
17
18
  folder = (root + Pathname.new(parent_url)).parent.realpath
18
19
  path = (folder + path).to_s
19
-
20
- path.slice! sprockets.paths.select{|p| path.include? p }.first
20
+ path.slice! sprockets.paths.select{|p| path.include? p }.first
21
21
  end
22
-
22
+
23
23
  path = sprockets.resolve path
24
- puts "RESOLVED PATH #{path.to_s}"
25
24
  path.relative_path_from(root).to_s
26
25
  end
27
26
 
@@ -30,17 +29,17 @@ module Trackman
30
29
  end
31
30
 
32
31
  def init_env
33
- if defined?(::Rails) && ::Rails.application
34
- env = ::Rails.application.class.assets
35
- env.append_path "#{working_dir}/public"
36
- else
32
+ #if defined?(::Rails) && ::Rails.application
33
+ # env = ::Rails.application.class.assets
34
+ # env.append_path "#{working_dir}/public"
35
+ #else
37
36
  env = ::Sprockets::Environment.new
38
37
  paths = ['app', 'lib', 'vendor'].inject([]) do |array, f|
39
38
  array + ["images", "stylesheets", "javascripts"].map{|p| "#{working_dir}/#{f}/assets/#{p}" }
40
39
  end
41
40
  paths << "#{working_dir}/public"
42
41
  paths.each{|p| env.append_path p }
43
- end
42
+ #end
44
43
 
45
44
  env
46
45
  end
@@ -41,12 +41,18 @@ module Trackman
41
41
  end
42
42
 
43
43
  def create!
44
+ puts "***CREATE ASSET**"
45
+ puts build_params
46
+ puts "*****"
44
47
  response = RestClient.post @@site, build_params, :content_type => :json, :accept => :json
45
48
  path = response.headers[:location]
46
49
  @id = path[/\d+$/].to_i
47
50
  end
48
51
 
49
52
  def update!
53
+ puts "***UPDATE ASSET**"
54
+ puts build_params
55
+ puts "*****"
50
56
  RestClient.put "#{@@site}/#{id}", build_params, :content_type => :json, :accept => :json
51
57
  end
52
58
  def delete
@@ -1,3 +1,3 @@
1
1
  module Trackman
2
- VERSION = "0.2.84"
2
+ VERSION = "0.2.85"
3
3
  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.2.84
4
+ version: 0.2.85
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-07-23 00:00:00.000000000 Z
13
+ date: 2012-07-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client