build-files 0.2.4 → 0.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d90bbaa5e0e44de8a7660c779909abfb9f6b0bc
4
- data.tar.gz: d0f24d49f5fe73bf25c3a59958409a5962cbbd82
3
+ metadata.gz: 9f8d979ca269abf303a7196c8bd872b44d7dbfff
4
+ data.tar.gz: 166555ad73dbc6dea7f112c84fd2d409ea116727
5
5
  SHA512:
6
- metadata.gz: 0cf5698a32ea120a09594c3180a5c0501d015a9de93455ef572149500ee0c89f5139d1220e81633c64af5f3e3669b487fbaa91f5b82de9edd65849bf185eac38
7
- data.tar.gz: 9ad922fb31e63bdb06c73f45b9fd22725590032473ef591b8bb12bb42116c84d6f92e18c3ef1646b41e3ac7a7c5adf3212a2ac5b9920809fdcb0fef060dbe692
6
+ metadata.gz: 6df78d64005b0393a7046fca325c19cc128ec2747635687b81278e5f55dfdcd30d8e0c183b884edd3032b693f1655d6930ad8277edf17ba11a0dab4f9967677f
7
+ data.tar.gz: 14dcbdd89245d6c3cebb51a35bd8e6dad7be5f81ae12bcecb9099edd3c5cf28d9cec8255dab86a1a0b846c6d378cb4a7864e83ad4c3afd701ef2aa0ae15362d7
@@ -123,6 +123,11 @@ module Build
123
123
  self.class.new(File.join(@full_path, path), @root)
124
124
  end
125
125
 
126
+ # Define a new root with a sub-path:
127
+ def /(path)
128
+ self.class.new(File.join(self, path), self)
129
+ end
130
+
126
131
  def rebase(root)
127
132
  self.class.new(File.join(root, relative_path), root)
128
133
  end
@@ -83,11 +83,13 @@ module Build
83
83
  # Path was valid last update:
84
84
  if modified_time != last_time
85
85
  @changed << path
86
+
86
87
  # puts "Changed: #{path}"
87
88
  end
88
89
  else
89
90
  # Path didn't exist before:
90
91
  @added << path
92
+
91
93
  # puts "Added: #{path}"
92
94
  end
93
95
 
@@ -98,11 +100,13 @@ module Build
98
100
  end
99
101
  else
100
102
  @missing << path
103
+
101
104
  # puts "Missing: #{path}"
102
105
  end
103
106
  end
104
107
 
105
108
  @removed = last_times.keys
109
+ # puts "Removed: #{@removed.inspect}" if @removed.size > 0
106
110
 
107
111
  @oldest_time = file_times.min
108
112
  @newest_time = file_times.max
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Build
22
22
  module Files
23
- VERSION = "0.2.4"
23
+ VERSION = "0.2.5"
24
24
  end
25
25
  end
@@ -113,5 +113,12 @@ module Build::Files::PathSpec
113
113
 
114
114
  expect(path + "d/e/f").to be == "/a/b/c/d/e/f"
115
115
  end
116
+
117
+ it "should have a new root" do
118
+ rerooted_path = path / "cat"
119
+
120
+ expect(rerooted_path.root).to be == "/foo/bar/baz"
121
+ expect(rerooted_path.relative_path).to be == "cat"
122
+ end
116
123
  end
117
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2014-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler