swiftly 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +2 -0
  4. data/Dropbox/Development/www/Swiftlyfile +8 -0
  5. data/Gemfile +3 -0
  6. data/bin/swiftly +15 -0
  7. data/lib/swiftly/Rakefile +38 -0
  8. data/lib/swiftly/app_module.rb +320 -0
  9. data/lib/swiftly/clean.rb +33 -0
  10. data/lib/swiftly/cli.rb +36 -0
  11. data/lib/swiftly/config.rb +131 -0
  12. data/lib/swiftly/config_global_generator.rb +35 -0
  13. data/lib/swiftly/config_plugins_generator.rb +33 -0
  14. data/lib/swiftly/config_project_generator.rb +32 -0
  15. data/lib/swiftly/config_swiftlyfile_generator.rb +34 -0
  16. data/lib/swiftly/config_templates_generator.rb +33 -0
  17. data/lib/swiftly/configure.rb +27 -0
  18. data/lib/swiftly/configure_all.rb +181 -0
  19. data/lib/swiftly/configure_local.rb +34 -0
  20. data/lib/swiftly/configure_production.rb +42 -0
  21. data/lib/swiftly/configure_staging.rb +41 -0
  22. data/lib/swiftly/create.rb +94 -0
  23. data/lib/swiftly/create_git.rb +40 -0
  24. data/lib/swiftly/create_project.rb +67 -0
  25. data/lib/swiftly/create_wordpress.rb +185 -0
  26. data/lib/swiftly/database.rb +213 -0
  27. data/lib/swiftly/destroy.rb +53 -0
  28. data/lib/swiftly/enable.rb +13 -0
  29. data/lib/swiftly/enable_wordpress.rb +22 -0
  30. data/lib/swiftly/generate.rb +23 -0
  31. data/lib/swiftly/generate_post_type.rb +50 -0
  32. data/lib/swiftly/init.rb +130 -0
  33. data/lib/swiftly/packages.rb +137 -0
  34. data/lib/swiftly/project.rb +127 -0
  35. data/lib/swiftly/pull.rb +25 -0
  36. data/lib/swiftly/push.rb +60 -0
  37. data/lib/swiftly/rollback.rb +78 -0
  38. data/lib/swiftly/setup.rb +34 -0
  39. data/lib/swiftly/ssh.rb +36 -0
  40. data/lib/swiftly/templates/config_global.erb +3 -0
  41. data/lib/swiftly/templates/config_project.erb +11 -0
  42. data/lib/swiftly/templates/gitignore.erb +7 -0
  43. data/lib/swiftly/templates/post_type.erb +98 -0
  44. data/lib/swiftly/templates/swiftlyfile.erb +21 -0
  45. data/lib/swiftly/version.rb +4 -0
  46. data/swiftly.gemspec +61 -0
  47. data/test/test_swiftly_spec.rb +18 -0
  48. metadata +175 -0
data/swiftly.gemspec ADDED
@@ -0,0 +1,61 @@
1
+ $:.unshift File.expand_path("../lib", __FILE__)
2
+ require "swiftly/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = Swiftly::APP_NAME
6
+ s.version = Swiftly::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.summary = "Swiftly is a all-in-one WordPress development tool"
9
+ s.description = "Swiftly is a all-in-one tool designed to make project management, WordPress development, MySQL database backups and syncing MySQL databases between multi-environments a breeze."
10
+ s.authors = ["Mic Alexander"]
11
+ s.email = 'mic@micalexander.com'
12
+ s.files = Dir['lib/ *.rb']
13
+ s.executables = ["swiftly"]
14
+ s.required_rubygems_version = ">= 2.1.3"
15
+
16
+ s.add_dependency "git", "~> 1.2.6"
17
+ s.add_dependency "rubyzip", "~> 1.0.0"
18
+ s.add_dependency "thor", "~> 0.19.1"
19
+ s.add_dependency "mina", "~> 0.3.7"
20
+ s.add_dependency "activesupport", "~> 4.0.1"
21
+ s.add_dependency "awesome_print", "~> 1.6.1"
22
+
23
+ # The following block of code determines the files that should be included
24
+ # in the gem. It does this by reading all the files in the directory where
25
+ # this gemspec is, and parsing out the ignored files from the gitignore.
26
+ # Note that the entire gitignore(5) syntax is not supported, specifically
27
+ # the "!" syntax, but it should mostly work correctly.
28
+ root_path = File.dirname(__FILE__)
29
+ all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
30
+ all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
31
+ gitignore_path = File.join(root_path, ".gitignore")
32
+ gitignore = File.readlines(gitignore_path)
33
+ gitignore.map! { |line| line.chomp.strip }
34
+ gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
35
+
36
+ unignored_files = all_files.reject do |file|
37
+
38
+ # Ignore any directories, the gemspec only cares about files
39
+ next true if File.directory?(file)
40
+
41
+ # Ignore any paths that match anything in the gitignore. We do
42
+ # two tests here:
43
+ #
44
+ # - First, test to see if the entire path matches the gitignore.
45
+ # - Second, match if the basename does, this makes it so that things
46
+ # like '.DS_Store' will match sub-directories too (same behavior
47
+ # as git).
48
+ #
49
+ gitignore.any? do |ignore|
50
+
51
+ File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
52
+
53
+ File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
54
+
55
+ end
56
+ end
57
+
58
+ s.files = unignored_files
59
+ s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
60
+ s.require_path = 'lib'
61
+ end
@@ -0,0 +1,18 @@
1
+ require "minitest/autorun"
2
+ require_relative "../lib/swiftly/configuration"
3
+
4
+ module Swiftly
5
+ describe Swiftly::ConfigGlobal do
6
+
7
+ before do
8
+ @swiftly = Swiftly::ConfigGlobal
9
+ end
10
+
11
+ describe "when config file created" do
12
+ it "must create config" do
13
+ @swiftly.create
14
+ end
15
+ end
16
+ end
17
+ end
18
+
metadata ADDED
@@ -0,0 +1,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: swiftly
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Mic Alexander
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: git
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.2.6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubyzip
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.19.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.19.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: mina
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.7
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.7
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 4.0.1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 4.0.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: awesome_print
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.6.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.6.1
97
+ description: Swiftly is a all-in-one tool designed to make project management, WordPress
98
+ development, MySQL database backups and syncing MySQL databases between multi-environments
99
+ a breeze.
100
+ email: mic@micalexander.com
101
+ executables:
102
+ - swiftly
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - ".DS_Store"
107
+ - ".gitignore"
108
+ - Dropbox/Development/www/Swiftlyfile
109
+ - Gemfile
110
+ - bin/swiftly
111
+ - lib/swiftly/Rakefile
112
+ - lib/swiftly/app_module.rb
113
+ - lib/swiftly/clean.rb
114
+ - lib/swiftly/cli.rb
115
+ - lib/swiftly/config.rb
116
+ - lib/swiftly/config_global_generator.rb
117
+ - lib/swiftly/config_plugins_generator.rb
118
+ - lib/swiftly/config_project_generator.rb
119
+ - lib/swiftly/config_swiftlyfile_generator.rb
120
+ - lib/swiftly/config_templates_generator.rb
121
+ - lib/swiftly/configure.rb
122
+ - lib/swiftly/configure_all.rb
123
+ - lib/swiftly/configure_local.rb
124
+ - lib/swiftly/configure_production.rb
125
+ - lib/swiftly/configure_staging.rb
126
+ - lib/swiftly/create.rb
127
+ - lib/swiftly/create_git.rb
128
+ - lib/swiftly/create_project.rb
129
+ - lib/swiftly/create_wordpress.rb
130
+ - lib/swiftly/database.rb
131
+ - lib/swiftly/destroy.rb
132
+ - lib/swiftly/enable.rb
133
+ - lib/swiftly/enable_wordpress.rb
134
+ - lib/swiftly/generate.rb
135
+ - lib/swiftly/generate_post_type.rb
136
+ - lib/swiftly/init.rb
137
+ - lib/swiftly/packages.rb
138
+ - lib/swiftly/project.rb
139
+ - lib/swiftly/pull.rb
140
+ - lib/swiftly/push.rb
141
+ - lib/swiftly/rollback.rb
142
+ - lib/swiftly/setup.rb
143
+ - lib/swiftly/ssh.rb
144
+ - lib/swiftly/templates/config_global.erb
145
+ - lib/swiftly/templates/config_project.erb
146
+ - lib/swiftly/templates/gitignore.erb
147
+ - lib/swiftly/templates/post_type.erb
148
+ - lib/swiftly/templates/swiftlyfile.erb
149
+ - lib/swiftly/version.rb
150
+ - swiftly.gemspec
151
+ - test/test_swiftly_spec.rb
152
+ homepage:
153
+ licenses: []
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 2.1.3
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.4.5
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: Swiftly is a all-in-one WordPress development tool
175
+ test_files: []