franksi 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 359b552b04c8d0652e4ef648f98c615f86006487
4
- data.tar.gz: c3d664e0a5c7bc5f62bfb2319fb6e7775832a3d8
3
+ metadata.gz: 2af8113babd5cdca6a1c972c4564fecd5e89d3f5
4
+ data.tar.gz: 3902471836e9e61c054406da0b4badfcff262de0
5
5
  SHA512:
6
- metadata.gz: 589fa182ffaf62d5fbf0d385dd582df51ff5e1cbae842ceddab47956faed3b4688dbf1ffbb4e7eafe856112f9dd578c89e1f4586664ff2685722c870ab8f73f6
7
- data.tar.gz: 68d87c93079a86b4dbe10038fd2149e58c9986253c52496c3ee5a86178a141edf3cb075a5ec6d26f8b01b351a229247267cb856415e279175f10bd4b2a6436a4
6
+ metadata.gz: d8d42d3ecf3a0ef181d316129f4822686f170e3bf89cbc13cd1e6ad916d2c9b7c32b6cfcf1d5a85ad1e866c1b23008e81cd8d8aa1687b74e3ecd1e08570692f6
7
+ data.tar.gz: c2bdcbd7dc7fcdd98400d4d6431da224cd0524609313f0daec93fbd55eb90684e94f4d94621e2c6b4c593db66ac7352748348794f64296213fa112967dbb4b33
data/.DS_Store CHANGED
Binary file
data/README.md CHANGED
@@ -4,17 +4,7 @@ A command-line tool Sinatra app generator. Yes, there are similar existing gems,
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'franksi'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
7
+ Install it as:
18
8
 
19
9
  $ gem install franksi
20
10
 
@@ -24,6 +14,26 @@ Create a basic Sinatra project:
24
14
 
25
15
  $ franksi new your-project
26
16
 
17
+ ## Template
18
+
19
+ The default template has the following structure:
20
+
21
+ ```
22
+ ├── public/
23
+ │ ├── css/
24
+ │ │ └── style.css
25
+ │ ├── images/
26
+ │ │ └── favicon.ico
27
+ │ └── javascripts/
28
+ │ └── script.js
29
+ ├── views/
30
+ │ ├── index.html.erb
31
+ │ └── layout.html.erb
32
+ ├── Gemfile
33
+ ├── config.ru
34
+ └── app.rb
35
+ ```
36
+
27
37
  ## Contributing
28
38
 
29
39
  1. Fork it ( https://github.com/[my-github-username]/franksi/fork )
data/bin/franksi CHANGED
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../lib/franksi'
2
+ require 'franksi'
3
3
 
4
4
  case ARGV[0]
5
- when "new"
5
+ when 'new'
6
6
  name = ARGV[1]
7
7
  if name
8
- Franksi::Project.new(name).create
9
- STDOUT.puts "-- Project #{name} created"
8
+ begin
9
+ Franksi::Project.new(name).create
10
+ STDOUT.puts "-- Project #{name} created"
11
+ rescue Errno::EEXIST => e
12
+ STDERR.puts e.message
13
+ end
10
14
  else
11
- puts "-- Command 'new' requires a value"
15
+ STDERR.puts "-- Command 'new' requires a value"
12
16
  end
13
17
  else
14
18
  STDOUT.puts <<-EOF
data/franksi.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Lais Varejão"]
10
10
  spec.email = ["laisvarejao@gmail.com"]
11
11
  spec.summary = "A command-line tool Sinatra app generator."
12
- spec.description = ""
12
+ spec.description = "A command-line tool Sinatra app generator. Yes, there are similar existing gems, but I did it my way."
13
13
  spec.homepage = "https://github.com/laisvarejao/franksi"
14
14
  spec.license = "MIT"
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Franksi
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/franksi.rb CHANGED
@@ -17,7 +17,7 @@ module Franksi
17
17
  private
18
18
 
19
19
  def new_directory
20
- raise 'Directory exists' if File.exist?(@name)
20
+ raise Errno::EEXIST, 'Directory exists' if File.exist? @name
21
21
  Dir.mkdir @name
22
22
  end
23
23
 
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
 
5
5
  <meta charset='UTF-8' />
6
- <title><%= @title %></title>
6
+ <title></title>
7
7
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
8
8
  <link rel="stylesheet" href="/css/style.css">
9
9
  <link rel="icon" href="/images/favicon.ico">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: franksi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lais Varejão
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,8 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: ''
41
+ description: A command-line tool Sinatra app generator. Yes, there are similar existing
42
+ gems, but I did it my way.
42
43
  email:
43
44
  - laisvarejao@gmail.com
44
45
  executables:
@@ -61,6 +62,7 @@ files:
61
62
  - lib/template/app.rb
62
63
  - lib/template/config.ru
63
64
  - lib/template/public/css/style.css
65
+ - lib/template/public/images/favicon.ico
64
66
  - lib/template/public/javascripts/script.js
65
67
  - lib/template/views/index.html.erb
66
68
  - lib/template/views/layout.html.erb