trocla 0.6.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: 4f7a0780a994967b2822530c7f6d0d705b76e35200e7829056d7d5ba1d78c754
4
- data.tar.gz: ac7ca45af328553379edc3c4fe5e9f77c455a48078d9b4dec3c9499620ed855f
3
+ metadata.gz: 23d5e8dfd009afd3c57c7621398d319cb5ccc503a2d8af485c32d99593ecd5c3
4
+ data.tar.gz: a8390bafef25e87f0c21c2a2e5c5035fcbb54e7dd2eb2ce337142dae6412e0ac
5
5
  SHA512:
6
- metadata.gz: 650c500e320f1b67171e54efff85f6b519c7d577f6fd4f08ea9ea5eb06228a59430db544307f74846c7a9050f09d6a942a8c427aa7564c095432edfe85e40319
7
- data.tar.gz: 8acc3a03116b77adbc13534a4d25ecd06d3eef9f6a6e8142ffcdd9bcb5cefce034936c0cfd149a6172cc2eeed80a88a3fac02300175e1c4abfd74b3b7d2ca1ef
6
+ metadata.gz: bb1442e7ce601a9c057c3df1dfba3eef8d59c0bb09112b30258978beff97e3f65bb38b3908db8e4f54ec90681fb5a3b4a355341c621273b34a2c540266a4251c
7
+ data.tar.gz: d8bc6e8656184fe454b3716cf137f48d1e2aa46ffdf368b4af528363fde7f159b17d8c5ea729792b7eac34d10d1610f05da35d33a09381d78ba52e0c69eda8f1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## to 0.8.0
4
+
5
+ * Add Argon2 format - Fixes [#84](https://github.com/duritong/trocla/issues/84)
6
+ * Add yescrypt format - Fixes [#81](https://github.com/duritong/trocla/issues/81) - not supported on Jruby
7
+
8
+ ## to 0.7.0
9
+
10
+ * bump support for various dependencies and ruby versions
11
+ * get rid off jeweler gem
12
+
3
13
  ## to 0.6.0
4
14
 
5
15
  * move away from sha1 since they are not supported anymore on all distributions
data/README.md CHANGED
@@ -174,6 +174,17 @@ Password hashes for PostgreSQL servers. Since postgesql 10 you can use the sha25
174
174
  You are able to tune the [cost factor of bcrypt](https://github.com/codahale/bcrypt-ruby#cost-factors) by passing the option `cost`.
175
175
  Note: ruby bcrypt does not support a [cost > 31](https://github.com/codahale/bcrypt-ruby/blob/master/lib/bcrypt/password.rb#L45).
176
176
 
177
+ ### argon2
178
+
179
+ You are able to tune argon2 options by passing the option `argon2` with what the [Argon2](https://github.com/technion/ruby-argon2?tab=readme-ov-file#usage) rubygem supports.
180
+
181
+ ### yescrypt
182
+
183
+ You are able to tune the cost factor of yescrypt by passing the option `cost`.
184
+ Note: yescrypt does not support a cost > 11
185
+
186
+ **Important:** Since we are using [XCrypt](https://github.com/rkh/ruby-xcrypt) gem, which calls out to libxcrypt through FFI, you cannot use the yecrypt format on JRuby installations, aka. OpenVox Server installations. If you want to deliver yescrypt hashes in your Puppet manifests, you need to generate the yescrypt hash in a Ruby MRI installation, once the hash is in the trocla database a OpenVox Server can just fetch it.
187
+
177
188
  ### x509
178
189
 
179
190
  This format takes a set of additional options. Required are:
@@ -247,7 +258,6 @@ Output render options are:
247
258
  ## Installation
248
259
 
249
260
  * Debian has trocla within its sid-release: `apt-get install trocla`
250
- * For RHEL/CentOS 7 there is a [copr reporisotry](https://copr.fedoraproject.org/coprs/duritong/trocla/). Follow the help there to integrate the repository and install trocla.
251
261
  * Trocla is also distributed as gem: `gem install trocla`
252
262
 
253
263
  ## Configuration
@@ -420,6 +430,6 @@ See [Changelog](CHANGELOG.md)
420
430
 
421
431
  ## Copyright
422
432
 
423
- Copyright (c) 2011-2015 mh. See LICENSE.txt for
433
+ Copyright (c) 2011-2026 mh. See LICENSE.txt for
424
434
  further details.
425
435
 
@@ -0,0 +1,7 @@
1
+ class Trocla::Formats::Argon2 < Trocla::Formats::Base
2
+ expensive true
3
+ require 'argon2'
4
+ def format(plain_password, options = {})
5
+ Argon2::Password.create(plain_password,options['argon2'] || {})
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ class Trocla::Formats::Yescrypt < Trocla::Formats::Base
2
+ expensive true
3
+ require 'xcrypt' unless Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
4
+ def format(plain_password, options = {})
5
+ raise 'Not supported on Jruby' if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
6
+ raise "Unsupported cost factor" if options['cost'] && options['cost'] > 11
7
+ XCrypt.yescrypt(plain_password, cost: options['cost'])
8
+ end
9
+ end
@@ -1,20 +1,11 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Trocla
4
- # VERSION
5
- class VERSION
6
- version = {}
7
- File.read(File.join(File.dirname(__FILE__), '../', 'VERSION')).each_line do |line|
8
- type, value = line.chomp.split(':')
9
- next if type =~ /^\s+$/ || value =~ /^\s+$/
10
-
11
- version[type] = value
12
- end
13
-
14
- MAJOR = version['major']
15
- MINOR = version['minor']
16
- PATCH = version['patch']
17
- BUILD = version['build']
4
+ module VERSION
5
+ MAJOR = 0
6
+ MINOR = 8
7
+ PATCH = 0
8
+ BUILD = nil
18
9
 
19
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
20
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trocla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-30 00:00:00.000000000 Z
11
+ date: 2026-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -16,167 +16,188 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: moneta
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bcrypt
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '3.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '3.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sshkey
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: base64
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
75
+ version: 0.3.0
76
+ type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.3.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: addressable
84
+ name: pstore
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
89
+ version: '0.2'
90
+ type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '0.2'
97
97
  - !ruby/object:Gem::Dependency
98
- name: jeweler
98
+ name: argon2
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.0'
104
- type: :development
103
+ version: '2.3'
104
+ type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '2.0'
110
+ version: '2.3'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rdoc
112
+ name: xcrypt
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.2'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
116
123
  - !ruby/object:Gem::Version
117
- version: '0'
124
+ version: '0.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '13.0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - ">="
136
+ - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '0'
138
+ version: '13.0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rspec
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
- - - ">="
143
+ - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: '0'
145
+ version: '3.13'
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
- - - ">="
150
+ - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: '0'
152
+ version: '3.13'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rspec-pending_for
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ">="
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.1'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.1'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rdoc
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
144
172
  - !ruby/object:Gem::Version
145
- version: '0'
173
+ version: '7.0'
146
174
  type: :development
147
175
  prerelease: false
148
176
  version_requirements: !ruby/object:Gem::Requirement
149
177
  requirements:
150
- - - ">="
178
+ - - "~>"
151
179
  - !ruby/object:Gem::Version
152
- version: '0'
180
+ version: '7.0'
153
181
  description: Trocla helps you to generate random passwords and to store them in various
154
- formats (plain, MD5, bcrypt) for later retrival.
155
- email: mh+trocla@immerda.ch
182
+ formats (plain, MD5, bcrypt) for later retrieval.
183
+ email:
184
+ - mh+trocla@immerda.ch
156
185
  executables:
157
186
  - trocla
158
187
  extensions: []
159
- extra_rdoc_files:
160
- - LICENSE.txt
161
- - README.md
188
+ extra_rdoc_files: []
162
189
  files:
163
- - ".document"
164
- - ".github/workflows/ruby.yml"
165
- - ".rspec"
166
190
  - CHANGELOG.md
167
- - Gemfile
168
191
  - LICENSE.txt
169
192
  - README.md
170
- - Rakefile
171
193
  - bin/trocla
172
- - ext/redhat/rubygem-trocla.spec
173
- - lib/VERSION
174
194
  - lib/trocla.rb
175
195
  - lib/trocla/default_config.yaml
176
196
  - lib/trocla/encryptions.rb
177
197
  - lib/trocla/encryptions/none.rb
178
198
  - lib/trocla/encryptions/ssl.rb
179
199
  - lib/trocla/formats.rb
200
+ - lib/trocla/formats/argon2.rb
180
201
  - lib/trocla/formats/bcrypt.rb
181
202
  - lib/trocla/formats/md5crypt.rb
182
203
  - lib/trocla/formats/mysql.rb
@@ -189,6 +210,7 @@ files:
189
210
  - lib/trocla/formats/sshkey.rb
190
211
  - lib/trocla/formats/wireguard.rb
191
212
  - lib/trocla/formats/x509.rb
213
+ - lib/trocla/formats/yescrypt.rb
192
214
  - lib/trocla/hooks.rb
193
215
  - lib/trocla/store.rb
194
216
  - lib/trocla/stores.rb
@@ -197,25 +219,13 @@ files:
197
219
  - lib/trocla/stores/vault.rb
198
220
  - lib/trocla/util.rb
199
221
  - lib/trocla/version.rb
200
- - spec/data/.keep
201
- - spec/fixtures/delete_test_hook.rb
202
- - spec/fixtures/set_test_hook.rb
203
- - spec/spec_helper.rb
204
- - spec/trocla/encryptions/none_spec.rb
205
- - spec/trocla/encryptions/ssl_spec.rb
206
- - spec/trocla/formats/pgsql_spec.rb
207
- - spec/trocla/formats/sshkey_spec.rb
208
- - spec/trocla/formats/x509_spec.rb
209
- - spec/trocla/hooks_spec.rb
210
- - spec/trocla/store/memory_spec.rb
211
- - spec/trocla/store/moneta_spec.rb
212
- - spec/trocla/util_spec.rb
213
- - spec/trocla_spec.rb
214
- - trocla.gemspec
215
222
  homepage: https://tech.immerda.ch/2011/12/trocla-get-hashed-passwords-out-of-puppet-manifests/
216
223
  licenses:
217
- - GPLv3
218
- metadata: {}
224
+ - GPL-3.0-or-later
225
+ metadata:
226
+ homepage_uri: https://tech.immerda.ch/2011/12/trocla-get-hashed-passwords-out-of-puppet-manifests/
227
+ source_code_uri: https://github.com/duritong/trocla
228
+ changelog_uri: https://github.com/duritong/trocla/blob/master/CHANGELOG.md
219
229
  post_install_message:
220
230
  rdoc_options: []
221
231
  require_paths:
@@ -224,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
234
  requirements:
225
235
  - - ">="
226
236
  - !ruby/object:Gem::Version
227
- version: '0'
237
+ version: '3.0'
228
238
  required_rubygems_version: !ruby/object:Gem::Requirement
229
239
  requirements:
230
240
  - - ">="
data/.document DELETED
@@ -1,4 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- LICENSE.txt
@@ -1,24 +0,0 @@
1
- ---
2
- name: Ruby
3
- on: [push, pull_request]
4
- jobs:
5
- spec:
6
- runs-on: ubuntu-latest
7
- steps:
8
- - name: check out repository
9
- uses: actions/checkout@v3
10
- - name: set up Ruby
11
- uses: ruby/setup-ruby@v1
12
- with:
13
- bundler-cache: true
14
- ruby-version: ${{ matrix.ruby }}
15
- - name: install dependencies
16
- run: bundle install
17
- - name: install wireguard
18
- run: sudo apt install -y wireguard
19
- - name: run rspec
20
- run: bundle exec rake spec
21
- strategy:
22
- fail-fast: false
23
- matrix:
24
- ruby: ['2.5','2.7', '3.0', '3.1','3.2','3.3','head','jruby','jruby-head']
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color --format documentation
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- source 'http://rubygems.org'
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- gem 'highline', '~> 2.0.0'
7
- gem 'moneta', '~> 1.0'
8
-
9
- if defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'jruby')
10
- gem 'jruby-openssl'
11
- end
12
- gem 'bcrypt'
13
- gem 'sshkey'
14
-
15
- # Add dependencies to develop your gem here.
16
- # Include everything needed to run rake, tests, features, etc.
17
- group :development do
18
- gem 'rake'
19
- gem 'addressable'
20
- gem 'jeweler', '~> 2.0'
21
- gem 'rdoc'
22
- gem 'rspec'
23
- gem 'rspec-pending_for'
24
- end
data/Rakefile DELETED
@@ -1,53 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
-
15
- require 'jeweler'
16
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
17
- require 'trocla'
18
- Jeweler::Tasks.new do |gem|
19
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
20
- gem.name = "trocla"
21
- gem.homepage = "https://tech.immerda.ch/2011/12/trocla-get-hashed-passwords-out-of-puppet-manifests/"
22
- gem.license = "GPLv3"
23
- gem.summary = "Trocla a simple password generator and storage"
24
- gem.description = "Trocla helps you to generate random passwords and to store them in various formats (plain, MD5, bcrypt) for later retrival."
25
- gem.email = "mh+trocla@immerda.ch"
26
- gem.authors = ["mh"]
27
- gem.version = Trocla::VERSION::STRING
28
- # dependencies defined in Gemfile
29
- end
30
- Jeweler::RubygemsDotOrgTasks.new
31
-
32
- require 'rspec/core'
33
- require 'rspec/core/rake_task'
34
- RSpec::Core::RakeTask.new(:spec) do |spec|
35
- spec.pattern = FileList['spec/**/*_spec.rb']
36
- end
37
-
38
- RSpec::Core::RakeTask.new(:rcov) do |spec|
39
- spec.pattern = 'spec/**/*_spec.rb'
40
- spec.rcov = true
41
- end
42
-
43
- task :default => :spec
44
-
45
- gem 'rdoc'
46
- require 'rdoc/task'
47
- RDoc::Task.new do |rdoc|
48
- version = Trocla::VERSION::STRING
49
- rdoc.rdoc_dir = 'rdoc'
50
- rdoc.title = "trocla #{version}"
51
- rdoc.rdoc_files.include('README*')
52
- rdoc.rdoc_files.include('lib/**/*.rb')
53
- end
@@ -1,120 +0,0 @@
1
- # Generated from trocla-0.1.2.gem by gem2rpm -*- rpm-spec -*-
2
- %global gem_name trocla
3
-
4
- Name: rubygem-%{gem_name}
5
- Version: 0.3.0
6
- Release: 1%{?dist}
7
- Summary: Trocla a simple password generator and storage
8
- Group: Development/Languages
9
- License: GPLv3
10
- URL: https://tech.immerda.ch/2011/12/trocla-get-hashed-passwords-out-of-puppet-manifests/
11
- Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
12
- Requires: rubygem-moneta
13
- Requires: rubygem-bcrypt
14
- Requires: rubygem-highline
15
- BuildRequires: rubygem-moneta = 0.7.20
16
- BuildRequires: rubygem-bcrypt
17
- BuildRequires: rubygem-highline
18
- %if 0%{?rhel} >= 7
19
- BuildRequires: ruby(release)
20
- %endif
21
- BuildRequires: rubygems-devel
22
- BuildRequires: ruby
23
- # BuildRequires: rubygem(mocha)
24
- # BuildRequires: rubygem(rspec) => 2.4
25
- # BuildRequires: rubygem(rspec) < 3
26
- # BuildRequires: rubygem(jeweler) => 1.6
27
- # BuildRequires: rubygem(jeweler) < 2
28
- BuildArch: noarch
29
-
30
- %description
31
- Trocla helps you to generate random passwords and to store them in various
32
- formats (plain, MD5, bcrypt) for later retrival.
33
-
34
-
35
- %package doc
36
- Summary: Documentation for %{name}
37
- Group: Documentation
38
- Requires: %{name} = %{version}-%{release}
39
- BuildArch: noarch
40
-
41
- %description doc
42
- Documentation for %{name}.
43
-
44
- %prep
45
- gem unpack %{SOURCE0}
46
-
47
- %setup -q -D -T -n %{gem_name}-%{version}
48
-
49
- gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
50
-
51
- %build
52
- # Create the gem as gem install only works on a gem file
53
- gem build %{gem_name}.gemspec
54
-
55
- # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
56
- # by default, so that we can move it into the buildroot in %%install
57
- %gem_install
58
-
59
- %install
60
- mkdir -p %{buildroot}%{gem_dir}
61
- cp -a .%{gem_dir}/* \
62
- %{buildroot}%{gem_dir}/
63
-
64
-
65
- mkdir -p %{buildroot}%{_bindir}
66
- mkdir -p %{buildroot}%{_sysconfdir}
67
- mkdir -p %{buildroot}/%{_sharedstatedir}/%{gem_name}
68
- touch %{buildroot}/%{_sharedstatedir}/%{gem_name}/%{gem_name}_data.yaml
69
-
70
- cp -pa .%{_bindir}/* \
71
- %{buildroot}%{_bindir}/
72
-
73
- chmod a+x %{buildroot}%{gem_instdir}/bin/%{gem_name}
74
-
75
- cat <<EOF > %{buildroot}/%{_sysconfdir}/%{gem_name}rc.yaml
76
- ---
77
- store: :moneta
78
- store_options:
79
- adapter: :YAML
80
- adapter_options:
81
- :file: '%{_sharedstatedir}/%{gem_name}/%{gem_name}_data.yaml'
82
- EOF
83
-
84
- # Run the test suite
85
- %check
86
- pushd .%{gem_instdir}
87
-
88
- popd
89
-
90
- %files
91
- %dir %{gem_instdir}
92
- %{_bindir}/trocla
93
- %{gem_instdir}/.rspec
94
- %exclude %{gem_instdir}/.travis.yml
95
- %exclude %{gem_instdir}/.rspec
96
- %exclude %{gem_instdir}/ext/redhat/%{name}.spec
97
- %license %{gem_instdir}/LICENSE.txt
98
- %{gem_instdir}/bin
99
- %{gem_libdir}
100
- %exclude %{gem_cache}
101
- %{gem_spec}
102
- %config(noreplace) %{_sysconfdir}/%{gem_name}rc.yaml
103
- %dir %attr(-, -, -) %{_sharedstatedir}/%{gem_name}
104
- %config(noreplace) %attr(660, root, root) %{_sharedstatedir}/%{gem_name}/%{gem_name}_data.yaml
105
-
106
- %files doc
107
- %doc %{gem_docdir}
108
- %doc %{gem_instdir}/.document
109
- %{gem_instdir}/Gemfile
110
- %doc %{gem_instdir}/README.md
111
- %doc %{gem_instdir}/CHANGELOG.md
112
- %{gem_instdir}/Rakefile
113
- %{gem_instdir}/spec
114
- %{gem_instdir}/trocla.gemspec
115
-
116
- %changelog
117
- * Mon Dec 21 2015 mh - 0.2.0-1
118
- - Release of v0.2.0
119
- * Sun Jun 21 2015 mh - 0.1.2-1
120
- - Initial package
data/lib/VERSION DELETED
@@ -1,4 +0,0 @@
1
- major:0
2
- minor:6
3
- patch:0
4
- build:
data/spec/data/.keep DELETED
File without changes
@@ -1,12 +0,0 @@
1
- class Trocla
2
- module Hooks
3
-
4
- def self.delete_test_hook(trocla, key, format, options)
5
- self.delete_messages << "#{key}_#{format}"
6
- end
7
-
8
- def self.delete_messages
9
- @delete_messages ||= []
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class Trocla
2
- module Hooks
3
-
4
- def self.set_test_hook(trocla, key, format, options)
5
- self.set_messages << "#{key}_#{format}"
6
- end
7
-
8
- def self.set_messages
9
- @set_messages ||= []
10
- end
11
- end
12
- end