telegrator 0.3.0 → 0.3.1
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 +5 -5
- data/README.md +6 -21
- data/lib/telegrator/cli.rb +2 -2
- data/lib/telegrator/generators/bot/templates/app/commands.rb.tt +5 -4
- data/lib/telegrator/generators/bot/templates/app/keyboards.rb.tt +2 -1
- data/lib/telegrator/generators/bot/templates/app/models.rb.tt +3 -2
- data/lib/telegrator/generators/bot/templates/app/services.rb.tt +2 -1
- data/lib/telegrator/generators/bot/templates/app/workers.rb.tt +3 -2
- data/lib/telegrator/generators.rb +3 -2
- data/lib/telegrator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 23ce203043fcc9f7ee4e04a0d3cb78ad36cb89cefb00bac6f7a73f8cf8e25d23
|
4
|
+
data.tar.gz: 154a86a4c62e94e3ce89ec343f5ed1f8c0d82964f593ad2c05059b8759da6c4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02163f269bc5aa2d521e2d5fc4a93cf95bfaee48ccf2203b62fd02ef9031875c4e1dfc578225f96660a49abd5a0fb9cbdbfe73dc34a6eb47b456fa4e152ff8d6
|
7
|
+
data.tar.gz: a9e5e7791f3089b24e946897bf692356d2ed6b88d86365eea374b5e902d5edb20a236144952e889a069e2f2a0bda0391032b2b27e7c046ab18f0e0d1ce83aae3
|
data/README.md
CHANGED
@@ -1,42 +1,32 @@
|
|
1
1
|
# Telegrator
|
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/telegrator`. 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
|
6
3
|
|
7
4
|
## Installation
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'telegrator'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
6
|
+
Telegrator only comes as a CLI application. To install it run:
|
20
7
|
|
21
8
|
$ gem install telegrator
|
22
9
|
|
10
|
+
|
23
11
|
## Usage
|
24
12
|
|
25
13
|
You can easily set up a new bot project:
|
26
14
|
|
27
15
|
$ telegrator new foo_bot
|
28
16
|
|
29
|
-
This will generate a skeleton
|
17
|
+
This will generate a skeleton like this:
|
30
18
|
```
|
31
19
|
foo_bot/
|
32
20
|
|__ app/
|
33
21
|
|__ commands/
|
34
22
|
|__ keyboards/
|
35
23
|
|__ models/
|
24
|
+
|__ services/
|
36
25
|
|__ workers/
|
37
26
|
|__ commands.rb
|
38
27
|
|__ keyboards.rb
|
39
28
|
|__ models.rb
|
29
|
+
|__ services.rb
|
40
30
|
|__ workers.rb
|
41
31
|
|__ bin/
|
42
32
|
|__ bot
|
@@ -50,15 +40,10 @@ foo_bot/
|
|
50
40
|
|__ Rakefile
|
51
41
|
```
|
52
42
|
|
53
|
-
## Development
|
54
|
-
|
55
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
56
|
-
|
57
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
58
43
|
|
59
44
|
## Contributing
|
60
45
|
|
61
|
-
Bug reports and pull requests are welcome
|
46
|
+
Bug reports and pull requests are welcome.
|
62
47
|
|
63
48
|
|
64
49
|
## License
|
data/lib/telegrator/cli.rb
CHANGED
@@ -2,11 +2,11 @@ require 'thor'
|
|
2
2
|
|
3
3
|
module Telegrator
|
4
4
|
class CLI < Thor
|
5
|
-
desc
|
5
|
+
desc 'version', 'Print version info'
|
6
6
|
def version
|
7
7
|
say "Telegrator #{Telegrator::VERSION}"
|
8
8
|
end
|
9
|
-
map %w
|
9
|
+
map %w[-v --version] => :version
|
10
10
|
|
11
11
|
register(
|
12
12
|
Generators::Bot,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Commands
|
2
|
-
autoload :Base, 'commands/base'
|
3
|
-
autoload :Start, 'commands/start'
|
4
|
-
autoload :Stop, 'commands/stop'
|
5
|
-
autoload :Missing, 'commands/missing'
|
6
2
|
end
|
3
|
+
|
4
|
+
require 'commands/base'
|
5
|
+
require 'commands/start'
|
6
|
+
require 'commands/stop'
|
7
|
+
require 'commands/missing'
|
data/lib/telegrator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telegrator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksey Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.7.3
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: A generator to set up new Telegram bot easily
|