ginst 0.0.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/CHANGELOG +3 -0
  2. data/Manifest +35 -0
  3. data/README.txt +1 -0
  4. data/Rakefile +17 -54
  5. data/bin/ginst +12 -0
  6. data/bin/ginst_master +11 -0
  7. data/ginst.gemspec +47 -0
  8. data/lib/app/authorization.rb +44 -0
  9. data/lib/app/views/assets/jquery.corners.js +7 -0
  10. data/lib/app/views/assets/jquery.js +19 -0
  11. data/lib/app/views/branch_index.haml +4 -0
  12. data/lib/app/views/clean_layout.haml +17 -0
  13. data/lib/app/views/commit.haml +8 -0
  14. data/lib/app/views/commits.haml +8 -0
  15. data/lib/app/views/full_commit.haml +38 -0
  16. data/lib/app/views/index.haml +1 -0
  17. data/lib/app/views/layout.haml +32 -0
  18. data/lib/app/views/not_found.haml +3 -0
  19. data/lib/app/views/project.haml +1 -0
  20. data/lib/app/views/project_index.haml +11 -0
  21. data/lib/app/views/style.sass +107 -0
  22. data/lib/app/webserver.rb +113 -0
  23. data/lib/ginst/command_line.rb +45 -0
  24. data/lib/ginst/ginst.rb +73 -0
  25. data/lib/ginst/master_command_line.rb +40 -0
  26. data/lib/ginst/plugin.rb +16 -0
  27. data/lib/ginst/project.rb +40 -0
  28. data/lib/ginst/server.rb +51 -0
  29. data/lib/ginst/templates/rgithook.rb +6 -0
  30. data/lib/ginst.rb +12 -0
  31. data/test/app/test_webserver.rb +21 -0
  32. data/test/test_ginst.rb +84 -0
  33. data/test/test_helper.rb +36 -0
  34. data/test/test_project.rb +8 -0
  35. data/test/test_server.rb +75 -0
  36. data.tar.gz.sig +4 -0
  37. metadata +131 -35
  38. metadata.gz.sig +0 -0
  39. data/.document +0 -5
  40. data/.gitignore +0 -21
  41. data/LICENSE +0 -20
  42. data/README.rdoc +0 -18
  43. data/features/ginst.feature +0 -9
  44. data/features/step_definitions/ginst_steps.rb +0 -0
  45. data/features/support/env.rb +0 -4
  46. data/spec/ginst_spec.rb +0 -7
  47. data/spec/spec.opts +0 -1
  48. data/spec/spec_helper.rb +0 -9
@@ -0,0 +1,75 @@
1
+ require 'test/test_helper'
2
+ require 'ruby-debug'
3
+
4
+ module Ginst
5
+ class ServerTest < Test::Unit::TestCase
6
+
7
+ def Server.fork(&block)
8
+ block.call
9
+ end
10
+
11
+ def test_start
12
+ options = {:path => :path, :port=>:port}
13
+ Server.expects(:sinatra_options).with(options).returns(:sinatra_options)
14
+ Server.expects(:run_daemon_with_env).with(:path,['start', '--', :sinatra_options]).returns(:return_value)
15
+ assert_equal Server.start(options), :return_value
16
+ end
17
+
18
+ def test_stop
19
+ options = {:path => :path, :port=>:port}
20
+ Server.expects(:run_daemon_with_env).with(:path,['stop']).returns(:return_value)
21
+ assert_equal Server.stop(options), :return_value
22
+ end
23
+
24
+ def test_restart
25
+ options = {:path => :path, :port=>:port}
26
+ Server.expects(:sinatra_options).with(options).returns(:sinatra_options)
27
+ Server.expects(:run_daemon_with_env).with(:path,['restart', '--', :sinatra_options]).returns(:return_value)
28
+ assert_equal Server.restart(options), :return_value
29
+ end
30
+
31
+ def test_status
32
+ options = {:path => :path, :port=>:port}
33
+ Server.expects(:run_daemon_with_env).with(:path,['status']).returns(mock('SerStats', :show_status => mock('server',:to_s => :return_value)))
34
+ assert_equal Server.status(options), :return_value
35
+ end
36
+
37
+
38
+ def test_run_daemon_with_env
39
+ ::RGitHook::RGitHook.expects(:new).with('path').returns(mock('@rgithook', :project_name => 'prj', :path=>'panceta'))
40
+ daemons_options = {:app_name => 'ginst-prj', :dir_mode => :normal, :dir=>'panceta', :ARGV => :test_env, :multiple => false, :log_output => true, :monitor => true, :mode => :exec}
41
+ Server.expects(:server_path).with('path').returns(:server_path)
42
+ Daemons.expects(:run).with(:server_path,daemons_options).returns(:ret_val)
43
+ assert_equal Server.send(:run_daemon_with_env,'path',:test_env), :ret_val
44
+ end
45
+
46
+ def test_sinatra_options
47
+ assert_equal Server.send(:sinatra_options,{}), "-p 7654 -e production"
48
+ end
49
+
50
+ # def self.server_path(path)
51
+ # File.expand_path(Grit::Repo.new(path).path,'ginst','webserver.rb')
52
+ # end
53
+ #
54
+ # Try to load de server of the local repo .git/ginst/webserver
55
+ # but if it does not exists, load the default
56
+ # def self.server_path(path)
57
+ # local_file = File.join(Grit::Repo.new(path).path,'ginst','webserver.rb')
58
+ # system_file= File.expand_path(File.join(File.dirname(__FILE__),'..','app','webserver.rb'))
59
+ # File.file?(local_file) ? local_file : system_file
60
+ # end
61
+
62
+ def test_server_path
63
+ Grit::Repo.expects(:new).with(:path).returns(mock('Grit::Repo', :path => 'path'))
64
+ path = 'path/ginst/webserver.rb'
65
+ File.expects(:file?).with(path).returns(true)
66
+ assert_equal Server.send(:server_path,:path), 'path/ginst/webserver.rb'
67
+ end
68
+
69
+ def test_server_path
70
+ Grit::Repo.expects(:new).with(:path).returns(mock('Grit::Repo', :path => 'path'))
71
+ assert_equal Server.send(:server_path,:path), File.expand_path(File.join(File.dirname(__FILE__),'..','lib','app','webserver.rb'))
72
+ end
73
+
74
+ end
75
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1,4 @@
1
+ K0�I�P�.U�4I��%�4ʟ
2
+ �W��ev�E?�u��(8ҧ+z�0��s�S�9&‰����h��})��(@
3
+ �0{����"�Кj���R���|����Np��Z�0N�o��ο�v�}��# ���{
4
+ >p,�j���Cɚ����э5��+j�Q�o G�d�� ��ƌр��d�A2� ���C]�c�'<zY3��x����3Oz0��ҵ!���Q�Uĺj�A|�]m��T���A�t\Хz
metadata CHANGED
@@ -1,29 +1,70 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ginst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
- - "Guillermo \xC3\x81lvarez Fern\xC3\xA1ndez"
7
+ - "Guillermo \xC3\x81lvarez"
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTI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pMaWNUOoRc0S7mJAsbHFRN/Rjvdinz68HSW1/rp9yq
29
+ GlZB6jMbJ64P4IpeXdpaTFHlCAMRBLlAMnHd18KQm0l39iVVfhTxpkvt/X4+R8Bl
30
+ IfYzkN8c0X6VDPrCKbd4IbEe
31
+ -----END CERTIFICATE-----
11
32
 
12
- date: 2009-11-09 00:00:00 +01:00
33
+ date: 2009-02-02 00:00:00 +01:00
13
34
  default_executable:
14
35
  dependencies:
15
36
  - !ruby/object:Gem::Dependency
16
- name: rspec
17
- type: :development
37
+ name: mojombo-grit
38
+ type: :runtime
18
39
  version_requirement:
19
40
  version_requirements: !ruby/object:Gem::Requirement
20
41
  requirements:
21
- - - ">="
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 0.9.4
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: rgithook
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.0
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: daemons
58
+ type: :runtime
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ~>
22
63
  - !ruby/object:Gem::Version
23
- version: 1.2.9
64
+ version: 1.0.10
24
65
  version:
25
66
  - !ruby/object:Gem::Dependency
26
- name: cucumber
67
+ name: mocha
27
68
  type: :development
28
69
  version_requirement:
29
70
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,35 +73,87 @@ dependencies:
32
73
  - !ruby/object:Gem::Version
33
74
  version: "0"
34
75
  version:
35
- description: GINST is the new integration system
76
+ description: Git Integration System.
36
77
  email: guillermo@cientifico.net
37
- executables: []
38
-
78
+ executables:
79
+ - ginst
80
+ - ginst_master
39
81
  extensions: []
40
82
 
41
83
  extra_rdoc_files:
42
- - LICENSE
43
- - README.rdoc
84
+ - bin/ginst
85
+ - bin/ginst_master
86
+ - CHANGELOG
87
+ - lib/app/authorization.rb
88
+ - lib/app/views/assets/jquery.corners.js
89
+ - lib/app/views/assets/jquery.js
90
+ - lib/app/views/branch_index.haml
91
+ - lib/app/views/clean_layout.haml
92
+ - lib/app/views/commit.haml
93
+ - lib/app/views/commits.haml
94
+ - lib/app/views/full_commit.haml
95
+ - lib/app/views/index.haml
96
+ - lib/app/views/layout.haml
97
+ - lib/app/views/not_found.haml
98
+ - lib/app/views/project.haml
99
+ - lib/app/views/project_index.haml
100
+ - lib/app/views/style.sass
101
+ - lib/app/webserver.rb
102
+ - lib/ginst/command_line.rb
103
+ - lib/ginst/ginst.rb
104
+ - lib/ginst/master_command_line.rb
105
+ - lib/ginst/plugin.rb
106
+ - lib/ginst/project.rb
107
+ - lib/ginst/server.rb
108
+ - lib/ginst/templates/rgithook.rb
109
+ - lib/ginst.rb
110
+ - README.txt
44
111
  files:
45
- - .document
46
- - .gitignore
47
- - LICENSE
48
- - README.rdoc
49
- - Rakefile
50
- - features/ginst.feature
51
- - features/step_definitions/ginst_steps.rb
52
- - features/support/env.rb
112
+ - bin/ginst
113
+ - bin/ginst_master
114
+ - CHANGELOG
115
+ - ginst.gemspec
116
+ - lib/app/authorization.rb
117
+ - lib/app/views/assets/jquery.corners.js
118
+ - lib/app/views/assets/jquery.js
119
+ - lib/app/views/branch_index.haml
120
+ - lib/app/views/clean_layout.haml
121
+ - lib/app/views/commit.haml
122
+ - lib/app/views/commits.haml
123
+ - lib/app/views/full_commit.haml
124
+ - lib/app/views/index.haml
125
+ - lib/app/views/layout.haml
126
+ - lib/app/views/not_found.haml
127
+ - lib/app/views/project.haml
128
+ - lib/app/views/project_index.haml
129
+ - lib/app/views/style.sass
130
+ - lib/app/webserver.rb
131
+ - lib/ginst/command_line.rb
132
+ - lib/ginst/ginst.rb
133
+ - lib/ginst/master_command_line.rb
134
+ - lib/ginst/plugin.rb
135
+ - lib/ginst/project.rb
136
+ - lib/ginst/server.rb
137
+ - lib/ginst/templates/rgithook.rb
53
138
  - lib/ginst.rb
54
- - spec/ginst_spec.rb
55
- - spec/spec.opts
56
- - spec/spec_helper.rb
139
+ - Manifest
140
+ - Rakefile
141
+ - README.txt
142
+ - test/app/test_webserver.rb
143
+ - test/test_ginst.rb
144
+ - test/test_helper.rb
145
+ - test/test_project.rb
146
+ - test/test_server.rb
57
147
  has_rdoc: true
58
- homepage: http://guillermo.github.com/ginst
59
- licenses: []
60
-
148
+ homepage: http://github.com/guillermo/ginst
61
149
  post_install_message:
62
150
  rdoc_options:
63
- - --charset=UTF-8
151
+ - --line-numbers
152
+ - --inline-source
153
+ - --title
154
+ - Ginst
155
+ - --main
156
+ - README.txt
64
157
  require_paths:
65
158
  - lib
66
159
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -73,15 +166,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
166
  requirements:
74
167
  - - ">="
75
168
  - !ruby/object:Gem::Version
76
- version: "0"
169
+ version: "1.2"
77
170
  version:
78
171
  requirements: []
79
172
 
80
173
  rubyforge_project: ginst
81
- rubygems_version: 1.3.5
174
+ rubygems_version: 1.3.1
82
175
  signing_key:
83
- specification_version: 3
84
- summary: Git Integration System
176
+ specification_version: 2
177
+ summary: With ginst you can send e-mails, twittes, record changes, run tests, deploy machines automatically every time you push to a server. You can manage all within its own web page. You can use for just one repo, or for all. It support GitHub push services
85
178
  test_files:
86
- - spec/ginst_spec.rb
87
- - spec/spec_helper.rb
179
+ - test/app/test_webserver.rb
180
+ - test/test_ginst.rb
181
+ - test/test_helper.rb
182
+ - test/test_project.rb
183
+ - test/test_server.rb
metadata.gz.sig ADDED
Binary file
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
data/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2009 Guillermo Álvarez Fernández
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc DELETED
@@ -1,18 +0,0 @@
1
- = ginst
2
-
3
- Description goes here.
4
-
5
- == Note on Patches/Pull Requests
6
-
7
- * Fork the project.
8
- * Make your feature addition or bug fix.
9
- * Add tests for it. This is important so I don't break it in a
10
- future version unintentionally.
11
- * Commit, do not mess with rakefile, version, or history.
12
- (if you want to have your own version, that is fine but
13
- bump version in a commit by itself I can ignore when I pull)
14
- * Send me a pull request. Bonus points for topic branches.
15
-
16
- == Copyright
17
-
18
- Copyright (c) 2009 Guillermo Álvarez Fernández. See LICENSE for details.
@@ -1,9 +0,0 @@
1
- Feature: something something
2
- In order to something something
3
- A user something something
4
- something something something
5
-
6
- Scenario: something something
7
- Given inspiration
8
- When I create a sweet new gem
9
- Then everyone should see how awesome I am
File without changes
@@ -1,4 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
- require 'ginst'
3
-
4
- require 'spec/expectations'
data/spec/ginst_spec.rb DELETED
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "Ginst" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end
data/spec/spec.opts DELETED
@@ -1 +0,0 @@
1
- --color
data/spec/spec_helper.rb DELETED
@@ -1,9 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'ginst'
4
- require 'spec'
5
- require 'spec/autorun'
6
-
7
- Spec::Runner.configure do |config|
8
-
9
- end