frap 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3672879a9ff4198cb54da59f84e64620bf98c6ae
4
- data.tar.gz: 7d11e668a47cde5a2b7cd11c804632fc8e69b9c4
2
+ SHA256:
3
+ metadata.gz: ef6521f457477ddc6134a27414d21d4b4b5f9b2925e5557c93ebd6f1f6fd03e6
4
+ data.tar.gz: 68cfd88891882c2af7de923fb8d7edf170570ef0df2be6b21f027def7758fe77
5
5
  SHA512:
6
- metadata.gz: ddc7b543e13b8293163a1847316bd5db92a35dc3c207f1c018446cb2c2928bd700c03eb7a05a1ec8aa904b458e8777e0c3e927eb1dcb25c7b634eadfc21cc493
7
- data.tar.gz: 9fc16282018078cbb959c2cadfe0413ec2dff5d72ac4722929d13d732573f98e5b7da5f1a52ca11418a2bccfefe528c2af71b378e5b6b9b83fd0602d23df0df7
6
+ metadata.gz: 0fd9d56712b5eed4920c96fbc42e0253ee5ecfdeb161fee387d9bffe5b5aa9c2625acb6a27d6de22dd0526095b34f2e6262f2b3c2543de76e2e8f06af6140c59
7
+ data.tar.gz: 53d94d94a6049fe3374d8a4170b17ac7fd5b512e27ea37ef640becbcb36c0d87d1cf4022493050f41e9a0cb297dd090fa944f4e8ac828e2f322c6c414b1d878f
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: flippakitten
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
data/.travis.yml CHANGED
@@ -3,5 +3,5 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.4.3
7
- before_install: gem install bundler -v 2.0.1
6
+ - 2.6.1
7
+ before_install: gem install bundler -v 2.0.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- frap (0.0.1)
4
+ frap (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -26,10 +26,10 @@ PLATFORMS
26
26
  ruby
27
27
 
28
28
  DEPENDENCIES
29
- bundler (~> 2.0)
29
+ bundler (~> 2.0.2)
30
30
  frap!
31
31
  rake (~> 10.0)
32
- rspec (~> 3.0)
32
+ rspec (~> 3.7.0)
33
33
 
34
34
  BUNDLED WITH
35
- 2.0.1
35
+ 2.0.2
data/README.md CHANGED
@@ -1,8 +1,16 @@
1
- # Frap
2
-
3
- Note: This is the absolute beginning of the app. **Version 0.1.0 will have the basic app creation**
1
+ [![Build Status](https://travis-ci.com/flippakitten/frap.svg?branch=master)](https://travis-ci.com/flippakitten/frap)
2
+ # Frap
4
3
  CLI interface to quickly prototype Flutter App's using the BLoC pattern with a Rails API server.
4
+ **Note:** This is the absolute beginning of the app. **Version 0.1.0 will have the basic app creation**
5
+
6
+ ## Prerequisites
7
+ While building the CLI, we will be using [slidy](https://pub.dev/packages/slidy) CLI. This will mean initially there will be some limitations, there is a plan to remove the dependancy in later versions.
5
8
 
9
+ Ensure the following are installed:
10
+ * [Flutter](https://flutter.dev/docs/get-started/install)
11
+ * [Slidy](https://pub.dev/packages/slidy#instalation)
12
+ * [Ruby 2.6.1](https://rvm.io/rvm/install) (I've used RVM but you can install it anyway)
13
+ * Rails
6
14
 
7
15
  ## Installation
8
16
 
@@ -17,7 +25,7 @@ Check the version
17
25
 
18
26
  Create a new Flutter and Rails app.
19
27
  `frap new my_app`
20
- Note: This is still in development however this will create a new Parent directory for the Rails and Flutter App.
28
+ This will create a new Parent directory for the Rails and Flutter App.
21
29
  ```
22
30
  |__ my_app
23
31
  |__ my_app_server
@@ -25,6 +33,19 @@ Note: This is still in development however this will create a new Parent directo
25
33
  ```
26
34
 
27
35
 
36
+ ## Motivation
37
+ Moving from the old school PHP/HTML/JS/jQuery/Yii(later came bootstrap) into the Rails way of life, I quickly fell in love with Rails and how easy it was to build basic functionality.
38
+
39
+ In stepped in NodeJS and React and I was back to having to build everything from scratch, mixing presentation logic and business logic together "because it's the same thing" and then extracting components because as it turns out, it's not the same thing... **Not good for productivity** and it's very expensive, especially for startups.
40
+
41
+ Since then I've been trying every new JS framework and nothing really made things less convoluted.
42
+
43
+ When I started looking into Flutter and the recommended way to manage state using the BLoC pattern, I realized that the BLoC pattern and the way Flutter apps are structured (everythings a Widget much like everything is an Object) lends itself code automation, getting the boilerplate out the way.
44
+
45
+ The goal this CLI is to mimic Rails generators and allow you to do something like:
46
+ `frap g resource User name:string,email:string,age:int,password_digest`
47
+ This will call the rails generator as one would expect. In addition, it will create the "view", or page in Flutter with all the fields, routes and blocs ready to use, ready to save and most importantly... Already styled using the material dart package.
48
+
28
49
  ## Development
29
50
 
30
51
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/frap.gemspec CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "frap/version"
@@ -11,13 +10,13 @@ Gem::Specification.new do |spec|
11
10
 
12
11
  spec.summary = %q{Flutter and Rails App Generators}
13
12
  spec.description = %q{CLI to create a Flutter App backed with a Rails server for quick app protoyping}
14
- spec.homepage = "https://github.com/flippakitten/frapp"
13
+ spec.homepage = "https://github.com/flippakitten/frap"
15
14
  spec.license = "MIT"
16
15
 
17
16
  if spec.respond_to?(:metadata)
18
17
  spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
20
- spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
18
+ spec.metadata["source_code_uri"] = "https://github.com/flippakitten/frap"
19
+ spec.metadata["changelog_uri"] = "https://github.com/flippakitten/frap/wiki/Change-Log-Published"
21
20
  else
22
21
  raise "RubyGems 2.0 or newer is required to protect against " \
23
22
  "public gem pushes."
@@ -31,8 +30,9 @@ Gem::Specification.new do |spec|
31
30
  spec.bindir = "bin"
32
31
  spec.executables = ['frap']
33
32
  spec.require_paths = ["lib"]
33
+ spec.required_ruby_version = '>= 2.6.1'
34
34
 
35
- spec.add_development_dependency "bundler", "~> 2.0"
35
+ spec.add_development_dependency "bundler", "~> 2.0.2"
36
36
  spec.add_development_dependency "rake", "~> 10.0"
37
- spec.add_development_dependency "rspec", "~> 3.0"
37
+ spec.add_development_dependency "rspec", "~> 3.7.0"
38
38
  end
@@ -0,0 +1,50 @@
1
+ module Frap
2
+ class CreateApp
3
+ attr_accessor :name
4
+
5
+ def initialize(name)
6
+ @name = name.downcase
7
+ end
8
+
9
+ def build
10
+ create_parent_app
11
+ create_rails_api_server
12
+ create_flutter_app
13
+ setup_bloc_patter
14
+ show_completed_notes
15
+ end
16
+
17
+ private
18
+
19
+ def create_parent_app
20
+ puts "1 ================ Create Parent Directory #{name}"
21
+
22
+ system("mkdir #{name}")
23
+ Dir.chdir(name)
24
+ end
25
+
26
+ def create_rails_api_server
27
+ puts "2 ================ Rails new #{name}_server --api"
28
+
29
+ system("rails new #{name}_server --api -T")
30
+ end
31
+
32
+ def create_flutter_app
33
+ puts "3 ================ Flutter create app #{name}_ui"
34
+ system("flutter create #{name}_ui")
35
+ end
36
+
37
+ def setup_bloc_patter
38
+ puts '4 ================ Setup BLoC pattern using Slidy'
39
+ Dir.chdir("#{name}_ui")
40
+ system('rm -rf lib/')
41
+ system('mkdir lib')
42
+ system('slidy start')
43
+ end
44
+
45
+ def show_completed_notes
46
+ puts '================================= '
47
+ puts 'TODO: Install your favourite Rails Testing library'
48
+ end
49
+ end
50
+ end
data/lib/frap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Frap
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/frap.rb CHANGED
@@ -1,27 +1,5 @@
1
- require "frap/version"
1
+ require 'frap/version'
2
+ require 'frap/create_app'
2
3
 
3
4
  module Frap
4
- class Error < StandardError; end
5
-
6
- class CreateApp
7
- attr_accessor :name
8
-
9
- def initialize(name)
10
- @name = name.downcase
11
- end
12
- def build
13
- puts "1 ================ Create Parent Directory #{name}"
14
- system("mkdir #{name}")
15
- Dir.chdir(name)
16
- puts "2 ================ Rails new --api #{name}_server"
17
- system("rails new #{name}_server")
18
- puts "3 ================ Flutter create app #{name}_ui"
19
- system("flutter create #{name}_ui")
20
- puts '4 ================ Setup BLoC pattern using Slidy'
21
- Dir.chdir("#{name}_ui")
22
- system('rm -rf lib/')
23
- system('mkdir lib')
24
- system('slidy start')
25
- end
26
- end
27
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Gascoigne - Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: 2.0.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: 2.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: 3.7.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: 3.7.0
55
55
  description: CLI to create a Flutter App backed with a Rails server for quick app
56
56
  protoyping
57
57
  email:
@@ -61,6 +61,7 @@ executables:
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
+ - ".github/FUNDING.yml"
64
65
  - ".gitignore"
65
66
  - ".rspec"
66
67
  - ".travis.yml"
@@ -75,14 +76,15 @@ files:
75
76
  - bin/setup
76
77
  - frap.gemspec
77
78
  - lib/frap.rb
79
+ - lib/frap/create_app.rb
78
80
  - lib/frap/version.rb
79
- homepage: https://github.com/flippakitten/frapp
81
+ homepage: https://github.com/flippakitten/frap
80
82
  licenses:
81
83
  - MIT
82
84
  metadata:
83
- homepage_uri: https://github.com/flippakitten/frapp
84
- source_code_uri: 'TODO: Put your gem''s public repo URL here.'
85
- changelog_uri: 'TODO: Put your gem''s CHANGELOG.md URL here.'
85
+ homepage_uri: https://github.com/flippakitten/frap
86
+ source_code_uri: https://github.com/flippakitten/frap
87
+ changelog_uri: https://github.com/flippakitten/frap/wiki/Change-Log-Published
86
88
  post_install_message:
87
89
  rdoc_options: []
88
90
  require_paths:
@@ -91,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
93
  requirements:
92
94
  - - ">="
93
95
  - !ruby/object:Gem::Version
94
- version: '0'
96
+ version: 2.6.1
95
97
  required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  requirements:
97
99
  - - ">="
98
100
  - !ruby/object:Gem::Version
99
101
  version: '0'
100
102
  requirements: []
101
- rubyforge_project:
102
- rubygems_version: 2.6.14
103
+ rubygems_version: 3.0.4
103
104
  signing_key:
104
105
  specification_version: 4
105
106
  summary: Flutter and Rails App Generators