trackman 0.2.83 → 0.2.84

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/Rakefile CHANGED
@@ -36,7 +36,7 @@ namespace :setup do
36
36
  task :fixture, :name do |t, args|
37
37
  name = response = args[:name]
38
38
  puts "rails _3.0.9_ new spec/fixtures/rails309/#{name} -G -O -T"
39
- `rails _3.0.9_ new spec/fixtures/rails309/#{name} -G -O -T`
39
+ `rails _3.0.9_ new ./lib/trackman/assets/remote_asset.rb:74:inspec/fixtures/rails309/#{name} -G -O -T`
40
40
  end
41
41
  end
42
42
 
@@ -10,13 +10,16 @@ module Trackman
10
10
 
11
11
  def initialize attributes = {}
12
12
  @assets = []
13
+
14
+ self.virtual_path = attributes[:virtual_path]
13
15
  self.path = attributes[:path]
14
16
  end
15
17
 
18
+ attr_accessor :virtual_path
16
19
  attr_reader :path, :assets
17
20
 
18
21
  def to_remote
19
- RemoteAsset.new(:path => @path)
22
+ RemoteAsset.new(:path => @path, :virtual_path => self.virtual_path)
20
23
  end
21
24
 
22
25
  def ==(other)
@@ -12,7 +12,7 @@ module Trackman
12
12
 
13
13
  def assets
14
14
  result = children_paths.select{|p| p.internal_path? }.inject([]) do |array, p|
15
- asset = Asset.create(:path => translate(p, path))
15
+ asset = Asset.create(:virtual_path => p.dup, :path => translate(p, path))
16
16
  array << asset
17
17
  array.concat(asset.assets.select{|a| !array.include?(a) })
18
18
  array
@@ -30,17 +30,17 @@ module Trackman
30
30
  end
31
31
 
32
32
  def init_env
33
- #if defined?(::Rails) && ::Rails.application
34
- # env = ::Rails.application.class.assets
35
- # env.append_path "#{working_dir}/public"
36
- #else
33
+ if defined?(::Rails) && ::Rails.application
34
+ env = ::Rails.application.class.assets
35
+ env.append_path "#{working_dir}/public"
36
+ else
37
37
  env = ::Sprockets::Environment.new
38
38
  paths = ['app', 'lib', 'vendor'].inject([]) do |array, f|
39
39
  array + ["images", "stylesheets", "javascripts"].map{|p| "#{working_dir}/#{f}/assets/#{p}" }
40
40
  end
41
41
  paths << "#{working_dir}/public"
42
42
  paths.each{|p| env.append_path p }
43
- #end
43
+ end
44
44
 
45
45
  env
46
46
  end
@@ -67,7 +67,7 @@ module Trackman
67
67
 
68
68
  private
69
69
  def build_params
70
- { :asset => { :path => path.to_s, :file => File.open(path) } }
70
+ { :asset => { :virtual_path => virtual_path, :path => path.to_s, :file => File.open(path) } }
71
71
  end
72
72
  def ensure_config
73
73
  raise Errors::ConfigNotFoundError, "The config TRACKMAN_URL is missing." if @@server_url.nil?
@@ -1,3 +1,3 @@
1
1
  module Trackman
2
- VERSION = "0.2.83"
2
+ VERSION = "0.2.84"
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.83
4
+ version: 0.2.84
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: