phoenix-cli 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -2
- data/README.md +13 -14
- data/lib/phoenix-cli/cli.rb +19 -0
- data/lib/phoenix-cli/version.rb +1 -1
- data/phoenix-cli.gemspec +2 -1
- data/screenshot.gif +0 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d65ddf7dc3dc807134b5eeae970e75dbc3b90dec
|
4
|
+
data.tar.gz: 36e163eab71888fe1d22cb7b31db7d00334dc913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549e30ca8c562600343235cfc5fa284757216b4f89f53154f9eb36d3ded86679e704879e04a01862f1995a3fff57662f14800f10e8c6cc9afbebccceb0a74370
|
7
|
+
data.tar.gz: b93e98ea9bce1905fbdfbcb6a8372bdc8d0544b72213590f4ee5d0b11ab9c599971f879f740069287dba703b18835a7684d5642fc0621679c385e8f36d327e55
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
phoenix-cli (0.
|
4
|
+
phoenix-cli (0.0.2)
|
5
|
+
activesupport (~> 4.2.1)
|
5
6
|
thor (~> 0.19)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
11
|
+
activesupport (4.2.9)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
15
|
+
tzinfo (~> 1.1)
|
10
16
|
diff-lcs (1.3)
|
17
|
+
i18n (0.8.6)
|
18
|
+
minitest (5.10.2)
|
11
19
|
rspec (3.6.0)
|
12
20
|
rspec-core (~> 3.6.0)
|
13
21
|
rspec-expectations (~> 3.6.0)
|
@@ -22,6 +30,9 @@ GEM
|
|
22
30
|
rspec-support (~> 3.6.0)
|
23
31
|
rspec-support (3.6.0)
|
24
32
|
thor (0.19.4)
|
33
|
+
thread_safe (0.3.6)
|
34
|
+
tzinfo (1.2.3)
|
35
|
+
thread_safe (~> 0.1)
|
25
36
|
|
26
37
|
PLATFORMS
|
27
38
|
ruby
|
@@ -31,4 +42,4 @@ DEPENDENCIES
|
|
31
42
|
rspec (~> 3)
|
32
43
|
|
33
44
|
BUNDLED WITH
|
34
|
-
1.15.
|
45
|
+
1.15.2
|
data/README.md
CHANGED
@@ -4,27 +4,26 @@ Phoenix-cli
|
|
4
4
|
Phoenix Pretty CLI
|
5
5
|
Use Phoenix Framework with the same friendly rails interface
|
6
6
|
|
7
|
+
![Alt Text](screenshot.gif)
|
8
|
+
|
7
9
|
## Setup
|
8
10
|
|
9
11
|
1. Install `gem install phoenix-cli`.
|
10
12
|
|
11
|
-
##
|
12
|
-
|
13
|
-
1. Install Phoenix at the command prompt if you haven't yet:
|
14
|
-
$ phoenix install
|
15
|
-
|
16
|
-
|
17
|
-
2. At the command prompt, create a new Phoenix application:
|
18
|
-
$ phoenix new myapp
|
13
|
+
## Commands List
|
19
14
|
|
20
|
-
|
15
|
+
| Command | Description |
|
16
|
+
| --- | --- |
|
17
|
+
| install | Install Phoenix Framework |
|
18
|
+
| new APP_PATH | Create new Phoenix application |
|
19
|
+
| deps | Install the Phoenix dependencies |
|
20
|
+
| server | Start the web server |
|
21
|
+
| console | Start Phoenix console |
|
22
|
+
| routes | Show Phoenix routes |
|
23
|
+
| version | Get current CLI version |
|
21
24
|
|
22
|
-
3. Install the phoenix dependencies
|
23
|
-
$ phoenix deps
|
24
25
|
|
25
|
-
|
26
|
-
$ cd myapp
|
27
|
-
$ phoenix server
|
26
|
+
Run `phoenix` for more options
|
28
27
|
|
29
28
|
|
30
29
|
## Development
|
data/lib/phoenix-cli/cli.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'thor'
|
2
|
+
require 'active_support/inflector'
|
2
3
|
require 'phoenix-cli'
|
3
4
|
|
4
5
|
trap("SIGINT") { exit! }
|
@@ -34,6 +35,24 @@ module PhoenixCli
|
|
34
35
|
exec("iex -S mix")
|
35
36
|
end
|
36
37
|
|
38
|
+
desc "migrate", "Run ecto migrations"
|
39
|
+
def migrate
|
40
|
+
exec("mix ecto.migrate")
|
41
|
+
end
|
42
|
+
|
43
|
+
desc "generate", "Run generators"
|
44
|
+
def generate(generator, resource_name, *args)
|
45
|
+
if generator == 'scaffold'
|
46
|
+
commands = args.join(' ')
|
47
|
+
exec("mix phoenix.gen.html #{resource_name.camelize} #{resource_name.pluralize} #{commands}")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
desc "routes", "Show phoenix routes"
|
52
|
+
def routes
|
53
|
+
exec("mix phoenix.routes")
|
54
|
+
end
|
55
|
+
|
37
56
|
desc 'version', 'phoenix-cli version'
|
38
57
|
def version
|
39
58
|
puts PhoenixCli::VERSION
|
data/lib/phoenix-cli/version.rb
CHANGED
data/phoenix-cli.gemspec
CHANGED
data/screenshot.gif
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phoenix-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dayvson Lima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.2.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.2.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,6 +71,7 @@ files:
|
|
57
71
|
- lib/phoenix-cli/cli.rb
|
58
72
|
- lib/phoenix-cli/version.rb
|
59
73
|
- phoenix-cli.gemspec
|
74
|
+
- screenshot.gif
|
60
75
|
- spec/spec_helper.rb
|
61
76
|
homepage: https://github.com/dayvsonlima/phoenix-cli
|
62
77
|
licenses:
|
@@ -82,5 +97,4 @@ rubygems_version: 2.6.11
|
|
82
97
|
signing_key:
|
83
98
|
specification_version: 4
|
84
99
|
summary: Phoenix frienfly CLI write in ruby
|
85
|
-
test_files:
|
86
|
-
- spec/spec_helper.rb
|
100
|
+
test_files: []
|