doc_contract 0.1.2 → 0.1.4

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: 9615979608fcdb7242b7918b4b6d682bccdcefe7b00e9bd3210584f50152c231
4
- data.tar.gz: 5449d1dd1bec239a3fb322d0a1fae5e2f3f41b25c7092e63efaa47a4b093944f
3
+ metadata.gz: fb6f6bf75e0e4c9b9ea09c49146edba377b3346c5fcc8e9f7e9ecf932b422447
4
+ data.tar.gz: 52c2ed3b75132578ec81071c6ebf994c99ca6e814533c4acbbc76cfeacd8da38
5
5
  SHA512:
6
- metadata.gz: 2035304da5869bf0d46777fc486431df38e3789be6c42246c4b4618928303c7f4449fb94bb4130eb7309320c6e60c38eb844c1cc7b19b6716ca9ab24474a9041
7
- data.tar.gz: c4c1465a34f1bbc8abc4c0e3e638638e2d6cd3758fd7f041cbdf1f1e67ccce49794cb8620571ba836e179e9af7c185de6e2c7c8e278d95b169f81a3ae8d6067b
6
+ metadata.gz: dae1bda1cdd2890eba9cbf67eaf58e04aa4d12ea8eb5afbf99665a4d6c7f20f1f16d3596082e7ea19f2f1bd53219ffb51d38f37d5a9491cb765d3b75466aad21
7
+ data.tar.gz: d8cd507880bb8cfce24e98f7a1da83672290bcdd3de9ef0547159f5d9baaaba4f7c9c1bf59142c67be4e09595a9f23debebd753e492ee4d00ba06a6e84970934
data/README.md CHANGED
@@ -94,6 +94,8 @@ a VAT of 21%.
94
94
  And more contract stuff
95
95
  ```
96
96
 
97
+ NOTE: the `to_words` handlebars helper uses the (numbers\_and\_words)[https://github.com/kslazarev/numbers\_and\_words] gem.
98
+
97
99
  ## Installation
98
100
 
99
101
  ### Install the system dependencies
@@ -184,8 +186,42 @@ To change for example the icon, see the options at the [fomantic-ui](https://fom
184
186
 
185
187
  ### Screenshot
186
188
  ![Edit template scnreenshot](/spec/dummy/public/DocContract-template-edit.png)
189
+
187
190
  ## Contributing
188
- Contribution directions go here.
191
+ There are many ways to contribute. Here some example steps that should work.
192
+
193
+ ### 1. Fork the repository
194
+ Go to the original repository at https://gitlab.com/benja-2/doc\_contract and [fork](https://gitlab.com/benja-2/doc_contract/-/forks/new) the project.
195
+ Then `git clone` your code on your local computer.
196
+
197
+ If you are in the git repository directory you can tell your system to use the local code when actually the
198
+ gitlab repository is specified for faster debugging. To achieve this type:
199
+
200
+ ```bash
201
+ bundle config local.doc_contract .
202
+ ```
203
+
204
+ ### 2. Add your forked codebase to a project
205
+ To start from zero, create a new rails (> 7) project and add the `doc_contract` gem configured to use `gitlab` as a base:
206
+
207
+ ```bash
208
+ rails new my_doc_contract_project
209
+ cd my_doc_contract_project
210
+ ```
211
+
212
+ Then in the `Gemfile`
213
+ ```ruby
214
+ git_source(:gitlab) do |repo_name|
215
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
216
+ "git@gitlab.com:#{repo_name}.git"
217
+ end
218
+
219
+ gem 'doc_contract', gitlab: '<your gitlab name>/doc_contract', branch: :master
220
+ ```
221
+
222
+ ## CHANGELOG
223
+ The CHANGELOG can be found using
224
+ [CHANGELOG.md](/CHANGELOG.md)
189
225
 
190
226
  ## License
191
227
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -6,7 +6,7 @@ module DocContract
6
6
 
7
7
  def index
8
8
  authorize! :index, record_class
9
- @q = record_class.search query
9
+ @q = record_class.ransack query
10
10
  @q.sorts = "created_at desc" if @q.sorts.empty?
11
11
  @records = @q.result.includes(:contract_template).page(params[:page]).per(100)
12
12
  respond_with(@records)
@@ -6,7 +6,7 @@ module DocContract
6
6
 
7
7
  def index
8
8
  authorize! :index, record_class
9
- @q = record_class.search query
9
+ @q = record_class.ransack query
10
10
  @q.sorts = 'created_at desc' if @q.sorts.empty?
11
11
  @records = @q.result.page(params[:page]).per(100)
12
12
  respond_with(@records)
@@ -1,4 +1,5 @@
1
1
  require 'numbers_and_words'
2
+ require 'ransack'
2
3
  module DocContract
3
4
  class Engine < ::Rails::Engine
4
5
  #isolate_namespace self.name.deconstantize.safe_constantize
@@ -1,3 +1,3 @@
1
1
  module DocContract
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc_contract
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin ter Kuile
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-31 00:00:00.000000000 Z
11
+ date: 2022-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -164,7 +164,10 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- description: Create nice and easy contracts based on pandoc which uses LaTeX
167
+ description: |-
168
+ This is a mountable rails engine to create nice and easy contracts based on pandoc (which uses
169
+ LaTeX) that includes the GUI and can be used to include the relevant contracts to the system itself
170
+ or to simply have a WebGUI to make contract templates and instances
168
171
  email:
169
172
  - bterkuile@gmail.com
170
173
  executables: []
@@ -259,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
262
  - !ruby/object:Gem::Version
260
263
  version: '0'
261
264
  requirements: []
262
- rubygems_version: 3.3.6
265
+ rubygems_version: 3.3.7
263
266
  signing_key:
264
267
  specification_version: 4
265
268
  summary: Create nice and easy contracts based on pandoc