dindi 0.7.0 → 0.7.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: c956f4624d962f10a0e542ff9db37a3158a269c3
4
- data.tar.gz: b8360f89f5902eeae21cc10ac3502860a2b9444f
3
+ metadata.gz: 3522841c64dc34852076206b046951aac9b870f6
4
+ data.tar.gz: b4b1ffd015816cd77e9b38bf26a1289b18f1b6a5
5
5
  SHA512:
6
- metadata.gz: 84a5cd15bc12e9acf41c9999c87e4d9529c08e77c1e741ed7b38ca977af1ca26d956c1cdea1e2cd5dcec8811e8667b51f4445c93fbf7b9a6d3d7b060bc4435c2
7
- data.tar.gz: 820740421268764012a53355ccd6592c7b98afa0e87b92c97ce89ee21a059a732305993701ad91eeeec481916dc97bdc0ebdfd006d58686b9b966b558a0af63e
6
+ metadata.gz: f88d6242f94bed2ca1038d7d3e16265de3c10ca1d5ec6d84c315c5849372fdb673bd8dc1d6ccca6c3f8563689315ce3b372bf16c70afe5b8a4e707c4ba9f0795
7
+ data.tar.gz: c2b40ca3940b2c15ae6dc1f595ed045ff3c961ce2c1bb49c85f41e40935a8561a71e61ccd7d55723b4eb7786e1acce4ee2694a76999fe63b95ad644fe0aa13f0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,50 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18
+ #
19
+ # * Create a file at ~/.gitignore
20
+ # * Include files you want ignored
21
+ # * Run: git config --global core.excludesfile ~/.gitignore
22
+ #
23
+ # After doing this, these files will be ignored in all your git projects,
24
+ # saving you from having to 'pollute' every project you touch with them
25
+ #
26
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
27
+ #
28
+ # For MacOS:
29
+ #
30
+ #.DS_Store
31
+
32
+ # For TextMate
33
+ #*.tmproj
34
+ #tmtags
35
+
36
+ # For emacs:
37
+ #*~
38
+ #\#*
39
+ #.\#*
40
+
41
+ # For vim:
42
+ #*.swp
43
+
44
+ # For redcar:
45
+ #.redcar
46
+
47
+ # For rubinius:
48
+ #*.rbc
49
+
50
+ /bundle
data/Gemfile CHANGED
@@ -1,13 +1,4 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- gem "colorize"
6
- gem "bundler"
7
2
 
8
- # Add dependencies to develop your gem here.
9
- # Include everything needed to run rake, tests, features, etc.
10
- group :development do
11
- gem "bundler"
12
- gem "jeweler"
13
- end
3
+ # Specify your gem's dependencies in cronies.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2011 Samuel Chandra
1
+ Copyright (c) 2015 Samuel Chandra
2
+
3
+ MIT License
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -21,10 +21,6 @@ To create a new Sinatra app called 'convore'
21
21
 
22
22
  dindi -n convore
23
23
 
24
- To create a new Sinatra app called 'convore' for Ruby 1.9.1
25
-
26
- dindi -n convore -r 1.9.1
27
-
28
24
  == Contributing to dindi
29
25
 
30
26
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
@@ -37,6 +33,6 @@ To create a new Sinatra app called 'convore' for Ruby 1.9.1
37
33
 
38
34
  == Copyright
39
35
 
40
- Copyright (c) 2011 Samuel Chandra. See LICENSE.txt for
36
+ Copyright (c) 2015 Samuel Chandra. See LICENSE.txt for
41
37
  further details.
42
38
 
data/dindi.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dindi/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "dindi"
8
+ s.version = Dindi::VERSION
9
+ s.authors = ["Samuel Chandra"]
10
+ s.email = ["001@samuelc.com"]
11
+ s.summary = "Dindi is a hit from Sinatra"
12
+ s.description = "This gem will create a modular base for a new Sinatra app"
13
+ s.homepage = "http://github.com/samchandra/dindi"
14
+ s.license = "MIT"
15
+
16
+ s.files = `git ls-files`.split($/)
17
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_runtime_dependency "bundler", "~> 1.7"
22
+ s.add_runtime_dependency "colorize", "~> 0"
23
+ end
24
+
@@ -7,7 +7,7 @@ module Dindi
7
7
 
8
8
  def self.create_default_directories(options)
9
9
  project_absolute_dir = options.project_absolute_dir
10
- %w(tmp log public push views routes extlibs models helpers tests scripts).each do |dir|
10
+ %w(tmp log public push configs views routes extlibs models helpers tests scripts).each do |dir|
11
11
  FileUtils.mkdir_p(File.join(project_absolute_dir, dir))
12
12
  end
13
13
  end
@@ -46,7 +46,7 @@ module Dindi
46
46
 
47
47
  # copy location for not common template files
48
48
  special_location_hash = {"debug_on.rb" => File.join(project_absolute_dir, 'helpers', 'debug_on.rb'),
49
- "deploy_setting.rb" => File.join(project_absolute_dir, 'helpers', 'deploy_setting.rb'),
49
+ "deploy_setting.rb" => File.join(project_absolute_dir, 'configs', 'deploy_setting.rb'),
50
50
  "docs.haml" => File.join(project_absolute_dir, 'views', 'docs.haml'),
51
51
  "project_name.rb" => File.join(project_absolute_dir, "#{options.project_name}.rb")
52
52
  }
@@ -1,11 +1,14 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ # Basic
3
4
  gem "sinatra"
4
5
  gem "mysql2"
5
6
  gem "haml"
6
- gem "activesupport"
7
7
  gem "activerecord"
8
8
  gem "json"
9
- gem "pony"
10
9
 
10
+ # Optional
11
+ gem "activesupport"
12
+ gem "redis"
13
+ gem "pony"
11
14
  gem "rest-client"
@@ -7,15 +7,18 @@ require 'bundler/setup'
7
7
  require 'sinatra/base'
8
8
 
9
9
  # gems
10
- %w(logger json haml digest date time pony).each {|gem| require gem}
10
+ %w(logger json haml digest date time yaml).each {|gem| require gem}
11
11
 
12
- # helpers
13
- Dir.glob("./helpers/*.rb").each {|helper| require helper}
12
+ # load app config
13
+ Dir.glob("./configs/*.rb").each {|config| require config}
14
14
 
15
15
  # load db config and models
16
16
  require 'models'
17
17
 
18
- # extra library
18
+ # helpers
19
+ Dir.glob("./helpers/*.rb").each {|helper| require helper}
20
+
21
+ # external library
19
22
  Dir.glob("./extlibs/*.rb").each {|extlib| require extlib}
20
23
 
21
24
  # controllers
@@ -29,17 +32,19 @@ class Sinatra::Base
29
32
  include DebugOn
30
33
 
31
34
  # set sinatra's variables
32
- set :app_name, "<%= options.project_name.gsub(/(?:^|_)(.)/) { $1.upcase } %>"
33
- set :app_logger, ::Logger.new(File.join(File.dirname(__FILE__), 'log', "<%= options.project_name %>.log"))
34
- set :root, File.dirname(__FILE__)
35
- set :environment, DeploySetting.environment
35
+ set :app_name, "<%= options.project_name.gsub(/(?:^|_)(.)/) { $1.upcase } %>"
36
+ set :app_logger, ::Logger.new(File.join(File.dirname(__FILE__), 'log', "<%= options.project_name %>.log"))
37
+ set :root, File.dirname(__FILE__)
38
+ set :environment, DeploySetting.environment
36
39
 
37
40
  if settings.environment == :production
38
41
  enable :sessions, :logging, :dump_errors
39
42
  disable :run, :reload, :show_exceptions
43
+ # set :redis, Redis.new(:db => 2)
40
44
  else
41
45
  enable :sessions, :logging, :dump_errors, :show_exceptions
42
46
  disable :run, :reload
47
+ # set :redis, Redis.new(:db => 15)
43
48
  end
44
49
 
45
50
  end
@@ -3,7 +3,7 @@
3
3
  %title Docs
4
4
  %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
5
5
  %meta{:content => "NONE,NOARCHIVE", :name => "robots"}
6
- %link{:href => "http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css", :rel => "stylesheet", :type => "text/css"}
6
+ %link{:href=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css", :rel=>"stylesheet"}
7
7
  :css
8
8
  body {
9
9
  padding-top: 20px;
@@ -12,24 +12,23 @@
12
12
 
13
13
  %body
14
14
  .container-fluid
15
- .row-fluid
16
- .span12
17
- %h3
18
- API Docs
19
-
20
- %table.table.table-striped
21
- %thead
22
- %tr
23
- %th{:width => "10%"} Method
24
- %th{:width => "45%"} URL
25
- %th{:width => "45%"} Description
26
- %tfoot
27
- %tr
28
- %td{:colspan => "3"} Copyright &copy;2014
29
- %tbody
30
- %tr
31
- %td GET
32
- %td
33
- %a{:href => "http://servername.com"}
34
- http://servername
35
- %td Returns app cms
15
+ .row
16
+ .h3
17
+ API Docs
18
+ .row
19
+ %table.table.table-striped
20
+ %thead
21
+ %tr
22
+ %th{:width => "10%"} Method
23
+ %th{:width => "45%"} URL
24
+ %th{:width => "45%"} Description
25
+ %tfoot
26
+ %tr
27
+ %td{:colspan => "3"} Copyright &copy;2015
28
+ %tbody
29
+ %tr
30
+ %td GET
31
+ %td
32
+ %a{:href => "/"}
33
+ http://localhost
34
+ %td Load app home page
@@ -0,0 +1,3 @@
1
+ module Dindi
2
+ VERSION = "0.7.1"
3
+ end
metadata CHANGED
@@ -1,87 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dindi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Chandra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-04 00:00:00.000000000 Z
11
+ date: 2015-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: colorize
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
30
16
  requirements:
31
- - - '>='
17
+ - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '0'
19
+ version: '1.7'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - '>='
24
+ - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '0'
26
+ version: '1.7'
41
27
  - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: jeweler
28
+ name: colorize
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
- - - '>='
31
+ - - "~>"
60
32
  - !ruby/object:Gem::Version
61
33
  version: '0'
62
- type: :development
34
+ type: :runtime
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
- - - '>='
38
+ - - "~>"
67
39
  - !ruby/object:Gem::Version
68
40
  version: '0'
69
41
  description: This gem will create a modular base for a new Sinatra app
70
- email: samuelchandra@yahoo.com
42
+ email:
43
+ - 001@samuelc.com
71
44
  executables:
72
45
  - dindi
73
46
  extensions: []
74
- extra_rdoc_files:
75
- - LICENSE.txt
76
- - README.rdoc
47
+ extra_rdoc_files: []
77
48
  files:
49
+ - ".document"
50
+ - ".gitignore"
78
51
  - Gemfile
79
- - Gemfile.lock
80
52
  - LICENSE.txt
81
53
  - README.rdoc
82
- - Rakefile
83
- - VERSION
84
54
  - bin/dindi
55
+ - dindi.gemspec
85
56
  - lib/dindi.rb
86
57
  - lib/dindi/command_parser.rb
87
58
  - lib/dindi/file_helper.rb
@@ -93,8 +64,7 @@ files:
93
64
  - lib/dindi/file_templates/shared/deploy_setting.rb.erb
94
65
  - lib/dindi/file_templates/shared/docs.haml.erb
95
66
  - lib/dindi/file_templates/shared/project_name.rb.erb
96
- - test/helper.rb
97
- - test/test_dindi.rb
67
+ - lib/dindi/version.rb
98
68
  homepage: http://github.com/samchandra/dindi
99
69
  licenses:
100
70
  - MIT
@@ -105,17 +75,17 @@ require_paths:
105
75
  - lib
106
76
  required_ruby_version: !ruby/object:Gem::Requirement
107
77
  requirements:
108
- - - '>='
78
+ - - ">="
109
79
  - !ruby/object:Gem::Version
110
80
  version: '0'
111
81
  required_rubygems_version: !ruby/object:Gem::Requirement
112
82
  requirements:
113
- - - '>='
83
+ - - ">="
114
84
  - !ruby/object:Gem::Version
115
85
  version: '0'
116
86
  requirements: []
117
87
  rubyforge_project:
118
- rubygems_version: 2.0.3
88
+ rubygems_version: 2.4.5
119
89
  signing_key:
120
90
  specification_version: 4
121
91
  summary: Dindi is a hit from Sinatra
data/Gemfile.lock DELETED
@@ -1,57 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.3.6)
5
- builder (3.2.2)
6
- colorize (0.7.3)
7
- descendants_tracker (0.0.4)
8
- thread_safe (~> 0.3, >= 0.3.1)
9
- faraday (0.9.0)
10
- multipart-post (>= 1.2, < 3)
11
- git (1.2.7)
12
- github_api (0.11.3)
13
- addressable (~> 2.3)
14
- descendants_tracker (~> 0.0.1)
15
- faraday (~> 0.8, < 0.10)
16
- hashie (>= 1.2)
17
- multi_json (>= 1.7.5, < 2.0)
18
- nokogiri (~> 1.6.0)
19
- oauth2
20
- hashie (3.1.0)
21
- highline (1.6.21)
22
- jeweler (2.0.1)
23
- builder
24
- bundler (>= 1.0)
25
- git (>= 1.2.5)
26
- github_api
27
- highline (>= 1.6.15)
28
- nokogiri (>= 1.5.10)
29
- rake
30
- rdoc
31
- json (1.8.1)
32
- jwt (1.0.0)
33
- mini_portile (0.6.0)
34
- multi_json (1.10.1)
35
- multi_xml (0.5.5)
36
- multipart-post (2.0.0)
37
- nokogiri (1.6.2.1)
38
- mini_portile (= 0.6.0)
39
- oauth2 (0.9.4)
40
- faraday (>= 0.8, < 0.10)
41
- jwt (~> 1.0)
42
- multi_json (~> 1.3)
43
- multi_xml (~> 0.5)
44
- rack (~> 1.2)
45
- rack (1.5.2)
46
- rake (10.3.2)
47
- rdoc (4.1.1)
48
- json (~> 1.4)
49
- thread_safe (0.3.4)
50
-
51
- PLATFORMS
52
- ruby
53
-
54
- DEPENDENCIES
55
- bundler
56
- colorize
57
- jeweler
data/Rakefile DELETED
@@ -1,55 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install --path vendor/bundle` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "dindi"
18
- gem.homepage = "http://github.com/samchandra/dindi"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Dindi is a hit from Sinatra}
21
- gem.description = %Q{This gem will create a modular base for a new Sinatra app}
22
- gem.email = "samuelchandra@yahoo.com"
23
- gem.authors = ["Samuel Chandra"]
24
- gem.files = FileList['lib/**/*', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
25
- gem.executables = ["dindi"]
26
- # dependencies defined in Gemfile
27
- end
28
- Jeweler::RubygemsDotOrgTasks.new
29
-
30
- require 'rake/testtask'
31
- Rake::TestTask.new(:test) do |test|
32
- test.libs << 'lib' << 'test'
33
- test.pattern = 'test/**/test_*.rb'
34
- test.verbose = true
35
- end
36
-
37
- # require 'rcov/rcovtask'
38
- # Rcov::RcovTask.new do |test|
39
- # test.libs << 'test'
40
- # test.pattern = 'test/**/test_*.rb'
41
- # test.verbose = true
42
- # test.rcov_opts << '--exclude "gems/*"'
43
- # end
44
-
45
- task :default => :test
46
-
47
- require 'rdoc/task'
48
- Rake::RDocTask.new do |rdoc|
49
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
50
-
51
- rdoc.rdoc_dir = 'rdoc'
52
- rdoc.title = "dindi #{version}"
53
- rdoc.rdoc_files.include('README*')
54
- rdoc.rdoc_files.include('lib/**/*.rb')
55
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.7.0
data/test/helper.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'dindi'
16
-
17
- class Test::Unit::TestCase
18
- end
data/test/test_dindi.rb DELETED
@@ -1,24 +0,0 @@
1
- require 'helper'
2
-
3
- class TestDindi < Test::Unit::TestCase
4
- should "be able to run rake test without error" do
5
- assert true
6
- end
7
-
8
- should "believe in the gem writer that this gem does work" do
9
- assert true
10
- end
11
-
12
- should "believe that BDD (Bug Driven Development) works" do
13
- assert true
14
- end
15
-
16
- should "believe that Ruby is better than Python" do
17
- assert true
18
- end
19
-
20
- should "believe that pigs can fly" do
21
- assert true
22
- end
23
-
24
- end