contracter 0.1.4 → 1.0.0

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: d607ea87aceaf13c53689815fd6157e1985416d3
4
- data.tar.gz: d5c04a6a815b00610aa5782bf653effe39646b14
3
+ metadata.gz: 36c1c3116c3dc286061c63edb7d9f64dd12686a1
4
+ data.tar.gz: fc522b7122d790e0f72f3cdc1490dcc1c7000251
5
5
  SHA512:
6
- metadata.gz: 98a5f14b78cd4afeebeab388c9d67800c006e1102890696204ed8fc84d1dbb3956822c6f31ed20eae2bfcdd9e2e706aaa9a8e6813935242192b101aec04363d1
7
- data.tar.gz: 75bc274a34226a60a4b3471fc72a374a3650a3e5c5bd0bd5ed1418c68b8bd942c1bf62caa1f0edf4fa81fb1555768b251bb3e12b93bd9cc4deb7ef07e2a7da19
6
+ metadata.gz: 3179351c5d8c3b48f246c54f632a5053995f67603b08a5c4c97b7f4e2d9a4b7dc4e5bb120f3eca882798a281489af602d1e8985914830311be987962cff95d37
7
+ data.tar.gz: c369201cd81b6891edf99dcafcd65ee1b5b156261c1863cc3267f306217416f402ae4bdb1faf4c4fe726a6a0df58b64eda556a0fb49a4d818e7eb9c784a50c55
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Contracter
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/contracter`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Contracter is a quality of life gem that provides a simple Domain Specific Language for web designers and developers to use in generating their client contracts. Contracts are generated in a Markdown format and are based on the popular open-source contract available [here](https://stuffandnonsense.co.uk/projects/contract-killer/).
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,28 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ First, require the gem:
24
+
25
+ ```ruby
26
+ require 'contracter'
27
+ ```
28
+
29
+ Then generate a contract by using the Contracter DSL syntax:
30
+
31
+ ```ruby
32
+ contract = Contracter.build do
33
+ # Any property can be used here, and will get replaced with the given value in the template where the method name appears in the format [name].
34
+ company 'Test Company Please Ignore'
35
+
36
+ # Any property given multiple values will be replaced with the values on separate lines.
37
+ browsers 'Safari', 'Google Chrome'
38
+
39
+ # If you would like to use your own template, you may explicitly pass Contracter the path to it. The template can be in any plain text UTF-8 encoded format.
40
+ template_path 'path/to/your/template.txt'
41
+ end
42
+ ```
43
+
44
+ The contract will be built from the template and returned as a Markdown-formatted string.
26
45
 
27
46
  ## Development
28
47
 
@@ -32,5 +51,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
51
 
33
52
  ## Contributing
34
53
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/contracter.
36
-
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/remi-gelinas/contracter.
@@ -43,16 +43,19 @@ Browser testing no longer means attempting to make a website look the same in br
43
43
 
44
44
  ### Desktop browser testing
45
45
 
46
- I test my work in current versions of major desktop browsers including those made by Apple (Safari), Google (Chrome), Microsoft (Edge), Mozilla Firefox and Opera. I'll also test to ensure that people who use Microsoft Internet Explorer 11 for Windows get an appropriate experience. I won’t test in other older browsers unless I agreed separately. If you need an enhanced design for an older browser, I can provide a separate estimate for that.
46
+ I test my work in current versions of major desktop browsers including:
47
+
48
+ [desktop_browsers]
49
+
50
+ I won’t test in other older browsers unless I agreed separately. If you need an enhanced design for an older browser, I can provide a separate estimate for that.
47
51
 
48
52
  ### Mobile browser testing
49
53
 
50
54
  Testing using popular smaller screen devices is essential in ensuring that a person’s experience of a design is appropriate to the capabilities of the device they’re using. I test my designs in:
51
55
 
52
- Google Chrome
53
- Android: Google Chrome on Android Emulator
56
+ [mobile_browsers]
54
57
 
55
- I won’t test in Blackberry, Opera Mini/Mobile, specific Android devices, Windows or other mobile browsers unless agreed separately.
58
+ I won’t test in other mobile browsers unless agreed upon separately.
56
59
 
57
60
  ### Technical support
58
61
 
@@ -65,8 +68,7 @@ I don’t guarantee improvements to your website's search engine ranking, but th
65
68
 
66
69
  ### Changes and revisions
67
70
 
68
- I know from experience that fixed-price contracts are rarely beneficial to you, as they often limit you to your earliest ideas. I don’t want to limit your ability to change your mind. The price at the beginning of this contract is based on the
69
- number of weeks that I estimate I'll need to accomplish everything you’ve told me you want to achieve, but I’m happy to be flexible. If you want to change your mind or add anything new, that won’t be a problem as I'll provide a separate estimate for those additional weeks.
71
+ I know from experience that fixed-price contracts are rarely beneficial to you, as they often limit you to your earliest ideas. I don’t want to limit your ability to change your mind. The price at the beginning of this contract is based on the number of weeks that I estimate I'll need to accomplish everything you’ve told me you want to achieve, but I’m happy to be flexible. If you want to change your mind or add anything new, that won’t be a problem as I'll provide a separate estimate for those additional weeks.
70
72
 
71
73
  ### Legal stuff
72
74
 
@@ -74,7 +76,7 @@ I can’t guarantee that my work will be error-free and so I can’t be liable t
74
76
 
75
77
  ### Copyrights
76
78
 
77
- First, you guarantee that all elements of text, images or other artwork you provide are either owned by your good selves, or that you’ve permission to use them.
79
+ First, you guarantee that all elements of text, images or other artwork you provide are either owned by you, or that you’ve permission to use them.
78
80
 
79
81
  Then, when your final payment has cleared, copyright will be automatically assigned as follows:
80
82
 
@@ -102,7 +104,7 @@ You agree to pay all charges associated with international transfers of funds. T
102
104
 
103
105
  Just like a parking ticket, you can’t transfer this contract to anyone else without my permission. This contract stays in place and need not be renewed. If for some reason one part of this contract becomes invalid or unenforceable, the remaining parts of it remain in place.
104
106
 
105
- Although the language is simple, the intentions are serious and this contract is a legal document under exclusive jurisdiction of [English and Welsh] courts.
107
+ Although the language is simple, the intentions are serious and this contract is a legal document under exclusive jurisdiction of [court] courts.
106
108
 
107
109
  ### The dotted line
108
110
 
@@ -1,34 +1,12 @@
1
1
  class Contract
2
- def company c
3
- @company = c
4
- end
5
-
6
- def client c
7
- @client = c
8
- end
9
-
10
- def client_address a
11
- @client_address = a
12
- end
13
-
14
- def service s
15
- @service = s
16
- end
17
-
18
- def estimated_total t
19
- @estimated_total = t
20
- end
21
-
22
- def payment_details d
23
- @payment_details = d
24
- end
25
-
26
- def payment_schedule s
27
- @payment_schedule = s
28
- end
29
-
30
- def date d
31
- @date = d
2
+ def method_missing(name_sym, *args)
3
+ if args.length == 1
4
+ self.instance_variable_set "@#{name_sym.to_s}", *args
5
+ elsif args.length > 1
6
+ self.instance_variable_set "@#{name_sym.to_s}", args.join('\n')
7
+ else
8
+ raise ArgumentError, 'Value not passed to template.'
9
+ end
32
10
  end
33
11
 
34
12
  def template_path p
@@ -1,3 +1,3 @@
1
1
  class Contracter
2
- VERSION = "0.1.4"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contracter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remi Gelinas