trophonius 1.3.1 → 1.4.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
  SHA256:
3
- metadata.gz: 193ec5a1a1a35715519760565271544fe7d14e56670ff533b30449db17a9739f
4
- data.tar.gz: 7b241ecfc24897f44d288fbb912c22fb950b1e645eddb1ed4b2cccaeb6022198
3
+ metadata.gz: 5cd1b995810aa5284fcf855c4e4398d232c8c89ddccc7198ae52b96141dd7d5f
4
+ data.tar.gz: d63843e3b6c432e52ae9b94b49a0e75307a8680be92f997b4a34b045728334f1
5
5
  SHA512:
6
- metadata.gz: 3c4e65f40f0f8e484ebf35418c9ec26b998f0c9cbd4610e449ec5f0c0abf2c49daec033b8c0929b8f15979f785a461218607b4f075a4d877b3dab6637f50c57e
7
- data.tar.gz: 7b64990a532ca0944514746d78b56adc39ea5b175c3d683ff284a09a101ad4f15fb94c391e8fee67223baf50bb4d5ad2dc6cb34c593f9cf8abf0a5b0fe3e5395
6
+ metadata.gz: 75eafee6437ab8b647abf164f80cdf144a0a21dca37963e94b3cdea1ed6ebb48c470b332544a96dc0c085b16a737e3a0e15a178ca6d3ac5e15bfef1f0bd51c7b
7
+ data.tar.gz: 4a6b0d5eb0d552855e087b5d2388fe1b58da5f425cd251805c95adc7863e5c53c52fbf1a2796877a0c1814e9bd9df10c4fd2f7450692941d3c22e2439cbaef3a
@@ -0,0 +1,30 @@
1
+ require 'rails'
2
+
3
+ module Trophonius
4
+ class InstallGenerator < ::Rails::Generators::Base
5
+ namespace 'trophonius'
6
+
7
+ class_option :host, type: :string, default: 'location_to.your_filemakerserver.com'
8
+ class_option :database, type: :string, default: 'Name_of_your_database'
9
+
10
+ source_root File.expand_path('../templates', __FILE__)
11
+
12
+ desc 'add the config file'
13
+
14
+ def copy_initializer_file
15
+ @host = options['host']
16
+ @database = options['database']
17
+ create_file 'config/initializers/trophonius.rb',
18
+ "Trophonius.configure do |config|
19
+ config.host = '#{@host}'
20
+ config.database = '#{@database}'
21
+ config.username = Rails.application.credentials.dig(:username) # (requires >= Rails 5.2) otherwise use old secrets
22
+ config.password = Rails.application.credentials.dig(:password) # (requires >= Rails 5.2) otherwise use old secrets
23
+ config.redis_connection = false # default false, true if you want to store the token in redis
24
+ config.ssl = true # or false depending on whether https or http should be used
25
+ # USE THE NEXT OPTION WITH CAUTION
26
+ config.local_network = false # if true the ssl certificate will not be verified to allow for self-signed certificates
27
+ end"
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ require 'rails'
2
+
3
+ module Trophonius
4
+ class ModelGenerator < ::Rails::Generators::Base
5
+ namespace 'trophonius_model'
6
+
7
+ class_option :model, type: :string, default: 'MyModel'
8
+ class_option :layout, type: :string, default: 'MyModelsLayout'
9
+
10
+ source_root File.expand_path('../templates', __FILE__)
11
+
12
+ desc 'add the config file'
13
+
14
+ def copy_model_file
15
+ @model = options['model']
16
+ @layout = options['layout']
17
+ create_file "app/models/#{@model.downcase}.rb",
18
+ "class #{@model.humanize} < Trophonius::Model
19
+ config layout_name: '#{@layout}'
20
+ end"
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trophonius
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kempen Automatisering
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-12-16 00:00:00.000000000 Z
@@ -54,11 +54,13 @@ dependencies:
54
54
  version: '5.0'
55
55
  description: A lightweight, easy to use link between Ruby (on Rails) and FileMaker
56
56
  using the FileMaker Data-API.
57
- email:
57
+ email:
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - lib/generators/trophonius_generator.rb
63
+ - lib/generators/trophonius_model_generator.rb
62
64
  - lib/trophonius.rb
63
65
  - lib/trophonius_config.rb
64
66
  - lib/trophonius_connection.rb
@@ -77,7 +79,7 @@ homepage: https://github.com/Willem-Jan/Trophonius
77
79
  licenses:
78
80
  - MIT
79
81
  metadata: {}
80
- post_install_message:
82
+ post_install_message:
81
83
  rdoc_options: []
82
84
  require_paths:
83
85
  - lib
@@ -93,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
95
  version: '0'
94
96
  requirements: []
95
97
  rubygems_version: 3.0.3
96
- signing_key:
98
+ signing_key:
97
99
  specification_version: 4
98
100
  summary: Link between Ruby (on Rails) and FileMaker.
99
101
  test_files: []