rodbot 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: 775aef555c61375dc26e53cf4b74d81b2d18dba2eba86da87733d6e34c82ec17
4
- data.tar.gz: b998f6b63241d62c480a86a2815c29893d2513fd3588b28d2abfc6da7a6c6a51
3
+ metadata.gz: a44274520f74f3723997267f1e2a456200e9f5118c6941dea6fc4704325bcf2b
4
+ data.tar.gz: 24462b4cbc3c4751c18d1277950f6e3e0deeb7834d65d6ea43edb98ccc7f4223
5
5
  SHA512:
6
- metadata.gz: 5ee8cde56a5d1875cd3b56eb4fce92859d5fdc37324f615a608deea62aed32508fe53ca410e23736fb0db66cfbbcee9e694b2a0bd70e0a2c0c4c2e562fad6a06
7
- data.tar.gz: 7cfbe33d7589747b0508b4d5604a9dbc1cc48302e3a7b8549951a382161a15efb1295bf774c49b1427792cb1110523e0f65496652d4b34b40df60f214340d4de
6
+ metadata.gz: f74b0b028597c229d5fec8b57f39ae36f62035974e87425dc6c6e4aeafc24df7e2a93ec7f298afe35983ff3d3cf91aae77049040b208c85df9c5ee89140f46ab
7
+ data.tar.gz: abd243858266c2c9e13b810803e63539539be30511a3f490581512d895d4d7a3ca63f07c45d23eb27afde0e163353de01374ab8ac3a9b8a7ac0a72abc553d436
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- ?�,�m4F��x��SB)}l�$H��$xOH#Q������������W���� �6�y9k1���7n �M�۟�Gӿ���C2��YC����$��-�]yZ6B�mm!Q;�|��A�ב7���|wm%'8�q��Ky#%�=7�xA6s���->�k����o�F��5T
1
+ ^�q��tn� �����Q8�`�_Q=�[KM��Sm�6~�gq?�F3&ƾ*p���lD[zV�
2
+ ��`�y2'ڰ�袟DooXm&��s��Ų�;��B�eZ6������g�'��m���Y��z��3N��f1��I�:��~bA�?��)�R+������4�
3
+ x��U'�`?�{�6��r�r3gj�6G�9V��*�I��#���X�$�����I�����V��RT�Y�D��;���#��=��l4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 0.1.1
6
+
7
+ #### Fixes
8
+ * Fix `rodbot new` by making `config/rodbot.rb` optional
9
+
5
10
  ## 0.1.0
6
11
 
7
12
  #### Initial Implementation
data/lib/rodbot/config.rb CHANGED
@@ -23,8 +23,8 @@ module Rodbot
23
23
  # Within Rodbot, you should use the +Rodbot.config+ shortcut to access the
24
24
  # configuration.
25
25
  #
26
- # file = File.new('config/rodbot.rb')
27
- # rc = Rodbot::Config.new(file.read)
26
+ # source = Pathname('config/rodbot.rb')
27
+ # rc = Rodbot::Config.new(source)
28
28
  # rc.config(:name) # => 'Bot'
29
29
  # rc.config(:country) # => nil
30
30
  # rc.config(:undefined) # => nil
@@ -77,13 +77,16 @@ module Rodbot
77
77
  end
78
78
  END
79
79
 
80
- # Read configuration from file
80
+ # Read configuration
81
81
  #
82
- # @param source [String] config source e.g. read from +config/rodbot.rb+
82
+ # @param source [String, IO] config source as raw string or file e.g. +config/rodbot.rb+
83
83
  # @param defaults [Boolean] whether to load the defaults or not
84
84
  # @return [self]
85
85
  def initialize(source, defaults: true)
86
- @config = Reader.new.eval_strings((DEFAULTS if defaults), source).to_h
86
+ @config = Reader.new.eval_strings(
87
+ (DEFAULTS if defaults),
88
+ (source.respond_to?(:read) ? (source.read if source.readable?) : source)
89
+ ).to_h
87
90
  end
88
91
 
89
92
  # Get config values and subtrees
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rodbot
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/rodbot.rb CHANGED
@@ -49,7 +49,7 @@ module Rodbot
49
49
  env Rodbot.env.current
50
50
  dir ENV['RODBOT_CREDENTIALS_DIR'] || Rodbot.env.root.join('config', 'credentials')
51
51
  end
52
- @config = Rodbot::Config.new(Rodbot.env.root.join('config', 'rodbot.rb').read)
52
+ @config = Rodbot::Config.new(Rodbot.env.root.join('config', 'rodbot.rb'))
53
53
  @plugins = Rodbot::Plugins.new
54
54
  @db = (db = @config.config(:db)) && Rodbot::Db.new(db)
55
55
  @log = Rodbot::Log.new
@@ -1,4 +1,6 @@
1
- # {{NAME}}
1
+ # Rodbot
2
2
 
3
- Your friendly neighbourhood bot.
3
+ Your friendly neighbourhood bot!
4
+
5
+ https://rubygems.org/gems/rodbot
4
6
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -29,7 +29,7 @@ cert_chain:
29
29
  kAyiRqgxF4dJviwtqI7mZIomWL63+kXLgjOjMe1SHxfIPo/0ji6+r1p4KYa7o41v
30
30
  fwIwU1MKlFBdsjkd
31
31
  -----END CERTIFICATE-----
32
- date: 2023-09-11 00:00:00.000000000 Z
32
+ date: 2023-09-12 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: zeitwerk
@@ -457,7 +457,6 @@ files:
457
457
  - lib/templates/deploy/procfile/Procfile.gerb
458
458
  - lib/templates/deploy/render-split/render.yaml.gerb
459
459
  - lib/templates/deploy/render/render.yaml.gerb
460
- - lib/templates/new/LICENSE.txt
461
460
  - lib/templates/new/README.md
462
461
  - lib/templates/new/app/app.rb
463
462
  - lib/templates/new/app/routes/help.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Sven Schwyn
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.