thermite 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d002cb267d9a1d645dd17f2367d51085c89bf04
4
- data.tar.gz: 4d1d9325d79676569e8cf2289c627d3211da672f
3
+ metadata.gz: d46ed87fb7a828cd7419b99e0b72497080cb706e
4
+ data.tar.gz: 79a9493717ca440209d37375b332e7ef5b598a01
5
5
  SHA512:
6
- metadata.gz: 108c54cafd7afe98df4f3bbfeb332f5dea0b00b159c0d684a25a7f8b64fea8f99174029d075a76fb6b4be9de3280bb635e29aeeb62651d2fa0c5379f9e78a683
7
- data.tar.gz: 7becbcb989abedc663104d9fc5f024929833468dc801863a6585fd02b3a506302903cb867e77b5b3c5b76501f3deb61538107008407e1d4aeee3651314866af9
6
+ metadata.gz: acedce2b841de01077166fc765ce33e10d9d600274b4ba99c6acdbdb6990bb8f48496bc9807a645c9c7f2116a7edffdcb784c704e29b5155cf8c8f73ee66d189
7
+ data.tar.gz: 9c7ae1c09eff27c99ddf9525c17f68c4683af53f2917edb14df8aa54e0daf28b7b426ef0daa0765e1d06efffd0164199a2e32ebd2fd56660876ed1208d44059d
data/NEWS.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## [0.11.1] - 2017-02-04
6
+
7
+ ### Fixed
8
+
9
+ * Add support for Cargo workspaces to `thermite:clean` and `thermite:test`
10
+
5
11
  ## [0.11.0] - 2017-02-03
6
12
 
7
13
  ### Added
@@ -120,6 +126,7 @@
120
126
 
121
127
  Initial release.
122
128
 
129
+ [0.11.1]: https://github.com/malept/thermite/compare/v0.11.0...v0.11.1
123
130
  [0.11.0]: https://github.com/malept/thermite/compare/v0.10.0...v0.11.0
124
131
  [0.10.0]: https://github.com/malept/thermite/compare/v0.9.0...v0.10.0
125
132
  [0.9.0]: https://github.com/malept/thermite/compare/v0.8.0...v0.9.0
data/README.md CHANGED
@@ -59,7 +59,7 @@ Task configuration for your project can be set in two ways:
59
59
  * passing arguments to `Thermite::Tasks.new`
60
60
  * adding a `package.metadata.thermite` section to `Cargo.toml`. These settings override the
61
61
  arguments passed to the `Tasks` class. Due to the conflict, it is infeasible for
62
- `cargo_project_path` to be set in this way. Example section:
62
+ `cargo_project_path` or `cargo_workspace_member` to be set in this way. Example section:
63
63
 
64
64
  ```toml
65
65
  [package.metadata.thermite]
@@ -55,15 +55,22 @@ module Thermite
55
55
  #
56
56
  def run_cargo_rustc(target)
57
57
  cargo_args = %w(rustc)
58
- if config.cargo_workspace_member
59
- manifest = File.join(config.cargo_workspace_member, 'Cargo.toml')
60
- cargo_args.push('--manifest-path', manifest)
61
- end
58
+ cargo_args.push(*cargo_manifest_path_args)
62
59
  cargo_args << '--release' if target == 'release'
63
60
  cargo_args.push(*cargo_rustc_args)
64
61
  run_cargo(*cargo_args)
65
62
  end
66
63
 
64
+ #
65
+ # If the `cargo_workspace_member` option is set, the `--manifest-path` argument to `cargo`.
66
+ #
67
+ def cargo_manifest_path_args
68
+ return [] unless config.cargo_workspace_member
69
+
70
+ manifest = File.join(config.cargo_workspace_member, 'Cargo.toml')
71
+ ['--manifest-path', manifest]
72
+ end
73
+
67
74
  #
68
75
  # Inform the user about cargo if it doesn't exist.
69
76
  #
@@ -89,7 +89,9 @@ module Thermite
89
89
  # current working directory.
90
90
  #
91
91
  # These values can be overridden by values with the same key name in the
92
- # `package.metadata.thermite` section of `Cargo.toml`, if that section exists.
92
+ # `package.metadata.thermite` section of `Cargo.toml`, if that section exists. The exceptions
93
+ # to this are `cargo_project_path` and `cargo_workspace_member`, since they are both used to
94
+ # find the `Cargo.toml` file.
93
95
  #
94
96
  attr_reader :options
95
97
 
@@ -133,14 +135,14 @@ module Thermite
133
135
  desc 'Clean up after thermite:build task'
134
136
  task 'thermite:clean' do
135
137
  FileUtils.rm(config.ruby_extension_path, force: true)
136
- run_cargo_if_exists 'clean'
138
+ run_cargo_if_exists 'clean', *cargo_manifest_path_args
137
139
  end
138
140
  end
139
141
 
140
142
  def define_test_task
141
143
  desc 'Run Rust testsuite'
142
144
  task 'thermite:test' do
143
- run_cargo_if_exists 'test'
145
+ run_cargo_if_exists 'test', *cargo_manifest_path_args
144
146
  end
145
147
  end
146
148
 
@@ -3,7 +3,7 @@ require 'English'
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'thermite'
6
- s.version = '0.11.0'
6
+ s.version = '0.11.1'
7
7
  s.summary = 'Rake helpers for Rust+Ruby'
8
8
  s.description = 'A Rake-based helper for building and distributing Rust-based Ruby extensions'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thermite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-04 00:00:00.000000000 Z
11
+ date: 2017-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake