appgen 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/README.md +5 -11
- data/appgen.gemspec +0 -2
- data/examples/blogdemo.txt +7 -0
- data/examples/mytodolist.txt +8 -0
- data/exe/appgen +1 -1
- data/lib/appgen.rb +0 -8
- data/lib/appgen/cli.rb +12 -0
- data/lib/appgen/generator.rb +7 -0
- data/lib/appgen/loader.rb +27 -0
- data/lib/appgen/version.rb +1 -1
- metadata +9 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 124c8365461d39d54d076e72bfcfa7171e8b9455
|
4
|
+
data.tar.gz: 3b5e05aef2ea8a74723f22503e77c7bdc55822f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9aec89cfeb9030555749eb66c15dfa2db72e6642679ad916e4f3e13529e559d3876780695517f0dfb44e1b0c57ea77aa1413e63045febd1ba4716101d54a637
|
7
|
+
data.tar.gz: 51329008b640be887dffb1499487a1e902309c2bf3390d2767dcbb29f3d893f94f8dee91d9f4b6cbeeb17c8f574a34bb21ab6ccb846dd133db5f1ed2ee727878
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/README.md
CHANGED
@@ -5,17 +5,7 @@ Describe your app in a text file, then run appgen.
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem 'appgen'
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
|
16
|
-
$ bundle
|
17
|
-
|
18
|
-
Or install it yourself as:
|
8
|
+
Install the gem:
|
19
9
|
|
20
10
|
$ gem install appgen
|
21
11
|
|
@@ -30,6 +20,10 @@ If you want to use a specific file, then do
|
|
30
20
|
|
31
21
|
$ appgen a_specific_file.txt
|
32
22
|
|
23
|
+
Or you can work with an online file
|
24
|
+
|
25
|
+
$ appgen https://raw.githubusercontent.com/arnaudlevy/appgen/master/examples/blogdemo.txt
|
26
|
+
|
33
27
|
## Writing app descriptions
|
34
28
|
|
35
29
|
Here is the rails blog demonstration as appgen description:
|
data/appgen.gemspec
CHANGED
@@ -19,8 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "thor"
|
23
|
-
|
24
22
|
spec.add_development_dependency "bundler", "~> 1.15"
|
25
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
24
|
end
|
data/exe/appgen
CHANGED
data/lib/appgen.rb
CHANGED
data/lib/appgen/cli.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Appgen
|
4
|
+
class Loader
|
5
|
+
def self.load(path=nil)
|
6
|
+
path = find_local_path if path.nil?
|
7
|
+
puts 'No description found, you should add an app description in a file, or call appgen with a path or url.' and return if path.nil?
|
8
|
+
read_description path
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.find_local_path
|
12
|
+
Dir['*'].each do |entry|
|
13
|
+
next if File.directory? entry
|
14
|
+
next if entry.start_with? '.'
|
15
|
+
puts "Found file named #{entry}"
|
16
|
+
return entry
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.read_description(path)
|
21
|
+
puts "Loading app description from #{path}"
|
22
|
+
app = open(path) { |f| f.read }
|
23
|
+
puts app
|
24
|
+
app
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/appgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Levy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: thor
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,6 +47,7 @@ extensions: []
|
|
61
47
|
extra_rdoc_files: []
|
62
48
|
files:
|
63
49
|
- ".gitignore"
|
50
|
+
- ".ruby-version"
|
64
51
|
- CODE_OF_CONDUCT.md
|
65
52
|
- Gemfile
|
66
53
|
- LICENSE
|
@@ -69,8 +56,13 @@ files:
|
|
69
56
|
- appgen.gemspec
|
70
57
|
- bin/console
|
71
58
|
- bin/setup
|
59
|
+
- examples/blogdemo.txt
|
60
|
+
- examples/mytodolist.txt
|
72
61
|
- exe/appgen
|
73
62
|
- lib/appgen.rb
|
63
|
+
- lib/appgen/cli.rb
|
64
|
+
- lib/appgen/generator.rb
|
65
|
+
- lib/appgen/loader.rb
|
74
66
|
- lib/appgen/version.rb
|
75
67
|
homepage: https://github.com/arnaudlevy/appgen
|
76
68
|
licenses: []
|
@@ -91,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
83
|
version: '0'
|
92
84
|
requirements: []
|
93
85
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.5.
|
86
|
+
rubygems_version: 2.5.1
|
95
87
|
signing_key:
|
96
88
|
specification_version: 4
|
97
89
|
summary: Rails prototyping is fast, appgen intends to make it even faster!
|