machined 1.0.0 → 1.0.1

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.
@@ -6,11 +6,11 @@ RSpec::Matchers.define :be_fresh do |env|
6
6
  actual.fresh?
7
7
  end
8
8
  end
9
-
9
+
10
10
  failure_message_for_should do |env|
11
11
  'expected asset to be fresh'
12
12
  end
13
-
13
+
14
14
  failure_message_for_should_not do |env|
15
15
  'expected asset to be stale'
16
16
  end
@@ -8,29 +8,29 @@ module Machined
8
8
  @machined = nil if config.delete(:reload)
9
9
  @machined ||= Machined::Environment.new(config.reverse_merge(:skip_bundle => true, :skip_autoloading => true))
10
10
  end
11
-
11
+
12
12
  # Convenience method for creating a new Machined sprocket,
13
13
  # with an automatic reference to the current Machined
14
14
  # environment instance.
15
15
  def create_sprocket(config = {})
16
16
  Machined::Sprocket.new machined, config
17
17
  end
18
-
18
+
19
19
  # Returns a fresh context, that can be used to test helpers.
20
20
  def build_context(logical_path = 'application.js', options = {})
21
21
  pathname = options[:pathname] || Pathname.new('assets').join(logical_path).expand_path
22
22
  env = options[:env] || machined.assets
23
-
23
+
24
24
  env.context_class.new env, logical_path, pathname
25
25
  end
26
-
26
+
27
27
  # Runs the CLI with the given args.
28
28
  def machined_cli(args, silence = true)
29
29
  capture(:stdout) {
30
30
  Machined::CLI.start args.split(' ')
31
31
  }
32
32
  end
33
-
33
+
34
34
  # Modifies the given file
35
35
  def modify(file, content = nil)
36
36
  Pathname.new(file).tap do |file|
@@ -39,7 +39,7 @@ module Machined
39
39
  file.utime future, future
40
40
  end
41
41
  end
42
-
42
+
43
43
  # Captures the given stream and returns it:
44
44
  #
45
45
  # stream = capture(:stdout) { puts 'Cool' }
@@ -54,7 +54,7 @@ module Machined
54
54
  ensure
55
55
  eval "$#{stream} = #{stream.upcase}"
56
56
  end
57
-
57
+
58
58
  result
59
59
  end
60
60
  end
@@ -8,13 +8,13 @@ RSpec::Matchers.define :match_paths do |expected|
8
8
  expected.map!(&:to_s)
9
9
  actual.map!(&:to_s)
10
10
  expected.map! { |path| File.join(@root, path) } if @root
11
-
11
+
12
12
  actual == expected
13
13
  end
14
-
14
+
15
15
  chain :with_root do |root|
16
16
  @root = root.to_s
17
17
  end
18
-
18
+
19
19
  diffable
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: machined
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -428,7 +428,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
428
428
  version: '0'
429
429
  segments:
430
430
  - 0
431
- hash: -3708924351974803974
431
+ hash: 3309700500908118760
432
432
  required_rubygems_version: !ruby/object:Gem::Requirement
433
433
  none: false
434
434
  requirements:
@@ -437,7 +437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
437
437
  version: '0'
438
438
  segments:
439
439
  - 0
440
- hash: -3708924351974803974
440
+ hash: 3309700500908118760
441
441
  requirements: []
442
442
  rubyforge_project: machined
443
443
  rubygems_version: 1.8.23