bookyt_projects 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Rails
4
+ # =====
5
+ gem 'rails', '~> 3.1.0.rc'
6
+
7
+ # Add dependencies to develop your gem here.
8
+ # Include everything needed to run rake, tests, features, etc.
9
+ group :development do
10
+ gem "shoulda", ">= 0"
11
+ gem "bundler", "~> 1.0.0"
12
+ gem "jeweler", "~> 1.6.4"
13
+ gem "rcov", ">= 0"
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,98 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.1.0)
5
+ actionpack (= 3.1.0)
6
+ mail (~> 2.3.0)
7
+ actionpack (3.1.0)
8
+ activemodel (= 3.1.0)
9
+ activesupport (= 3.1.0)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ i18n (~> 0.6)
13
+ rack (~> 1.3.2)
14
+ rack-cache (~> 1.0.3)
15
+ rack-mount (~> 0.8.2)
16
+ rack-test (~> 0.6.1)
17
+ sprockets (~> 2.0.0)
18
+ activemodel (3.1.0)
19
+ activesupport (= 3.1.0)
20
+ bcrypt-ruby (~> 3.0.0)
21
+ builder (~> 3.0.0)
22
+ i18n (~> 0.6)
23
+ activerecord (3.1.0)
24
+ activemodel (= 3.1.0)
25
+ activesupport (= 3.1.0)
26
+ arel (~> 2.2.1)
27
+ tzinfo (~> 0.3.29)
28
+ activeresource (3.1.0)
29
+ activemodel (= 3.1.0)
30
+ activesupport (= 3.1.0)
31
+ activesupport (3.1.0)
32
+ multi_json (~> 1.0)
33
+ arel (2.2.1)
34
+ bcrypt-ruby (3.0.0)
35
+ builder (3.0.0)
36
+ erubis (2.7.0)
37
+ git (1.2.5)
38
+ hike (1.2.1)
39
+ i18n (0.6.0)
40
+ jeweler (1.6.4)
41
+ bundler (~> 1.0)
42
+ git (>= 1.2.5)
43
+ rake
44
+ mail (2.3.0)
45
+ i18n (>= 0.4.0)
46
+ mime-types (~> 1.16)
47
+ treetop (~> 1.4.8)
48
+ mime-types (1.16)
49
+ multi_json (1.0.3)
50
+ polyglot (0.3.2)
51
+ rack (1.3.2)
52
+ rack-cache (1.0.3)
53
+ rack (>= 0.4)
54
+ rack-mount (0.8.3)
55
+ rack (>= 1.0.0)
56
+ rack-ssl (1.3.2)
57
+ rack
58
+ rack-test (0.6.1)
59
+ rack (>= 1.0)
60
+ rails (3.1.0)
61
+ actionmailer (= 3.1.0)
62
+ actionpack (= 3.1.0)
63
+ activerecord (= 3.1.0)
64
+ activeresource (= 3.1.0)
65
+ activesupport (= 3.1.0)
66
+ bundler (~> 1.0)
67
+ railties (= 3.1.0)
68
+ railties (3.1.0)
69
+ actionpack (= 3.1.0)
70
+ activesupport (= 3.1.0)
71
+ rack-ssl (~> 1.3.2)
72
+ rake (>= 0.8.7)
73
+ rdoc (~> 3.4)
74
+ thor (~> 0.14.6)
75
+ rake (0.9.2)
76
+ rcov (0.9.10)
77
+ rdoc (3.9.4)
78
+ shoulda (2.11.3)
79
+ sprockets (2.0.0)
80
+ hike (~> 1.2)
81
+ rack (~> 1.0)
82
+ tilt (!= 1.3.0, ~> 1.1)
83
+ thor (0.14.6)
84
+ tilt (1.3.3)
85
+ treetop (1.4.10)
86
+ polyglot
87
+ polyglot (>= 0.3.1)
88
+ tzinfo (0.3.29)
89
+
90
+ PLATFORMS
91
+ ruby
92
+
93
+ DEPENDENCIES
94
+ bundler (~> 1.0.0)
95
+ jeweler (~> 1.6.4)
96
+ rails (~> 3.1.0.rc)
97
+ rcov
98
+ shoulda
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Roman Simecek
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 ADDED
@@ -0,0 +1,19 @@
1
+ = bookyt_projects
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to bookyt_projects
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 Roman Simecek. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,27 @@
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` 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 = "bookyt_projects"
18
+ gem.homepage = "http://github.com/raskhadafi/bookyt_projects"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Rails engine for project management}
21
+ gem.description = %Q{Rails engine for project management it's used to extend the functionallity of bookyt.}
22
+ gem.email = "roman.simecek@cyt.ch"
23
+ gem.authors = ["Roman Simecek"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
File without changes
@@ -0,0 +1,3 @@
1
+ class ProjectStatesController < AuthorizedController
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class ProjectsController < AuthorizedController
2
+
3
+ end
@@ -0,0 +1,4 @@
1
+ class Project < ActiveRecord::Base
2
+ belongs_to :client, :class_name => 'Person'
3
+ belongs_to :project_state
4
+ end
@@ -0,0 +1,5 @@
1
+ class ProjectState < ActiveRecord::Base
2
+ def to_s
3
+ "#{name}"
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ = semantic_form_for @project_state do |f|
2
+ = f.semantic_errors
3
+ = f.inputs :name
4
+ = f.buttons do
5
+ = f.submit
@@ -0,0 +1,3 @@
1
+ %h1= t_title(:new, ProjectState)
2
+
3
+ = render 'form'
@@ -0,0 +1,11 @@
1
+ = semantic_form_for @project do |f|
2
+ = f.semantic_errors
3
+ = f.inputs do
4
+ = f.input :name, :input_html => {'data-autofocus' => 'true'}
5
+ = f.input :comment
6
+ = f.input :from, :as => :date_field
7
+ = f.input :to, :as => :date_field
8
+ = f.input :project_state
9
+ = f.input :client
10
+ = f.buttons do
11
+ = f.submit
@@ -0,0 +1,19 @@
1
+ - @attributes ||= collection.first.attribute_names - ['id', 'created_at', 'updated_at']
2
+ %table.list{:class => "#{collection.first.class.to_s.downcase.pluralize} collection"}
3
+ %thead
4
+ %tr
5
+ - @attributes.each do |field|
6
+ %th= t_attr field, collection.first.class
7
+ %th.action-links
8
+
9
+ - @attributes = @attributes - ['client_id', 'project_state_id']
10
+ %tbody
11
+ - collection.each do |r|
12
+ %tr
13
+ - @attributes.each do |field|
14
+ %td= r.send(field) if r.respond_to?(field)
15
+ %td= r.client
16
+ %td= r.project_state
17
+ %td.action-links
18
+ = list_link_for(:edit, r)
19
+ = list_link_for(:delete, r)
@@ -0,0 +1,3 @@
1
+ %h1= t_title(:new)
2
+
3
+ = render 'form'
@@ -0,0 +1,76 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bookyt_projects}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = [%q{Roman Simecek}]
12
+ s.date = %q{2011-09-09}
13
+ s.description = %q{Rails engine for project management it's used to extend the functionallity of bookyt.}
14
+ s.email = %q{roman.simecek@cyt.ch}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "app/assets/stylesheets/bookyt_projects.sass",
28
+ "app/controllers/project_states_controller.rb",
29
+ "app/controllers/projects_controller.rb",
30
+ "app/models/project.rb",
31
+ "app/models/project_state.rb",
32
+ "app/views/project_states/_form.html.haml",
33
+ "app/views/project_states/new.html.haml",
34
+ "app/views/projects/_form.html.haml",
35
+ "app/views/projects/_list.html.haml",
36
+ "app/views/projects/new.html.haml",
37
+ "bookyt_projects.gemspec",
38
+ "config/locales/de.yml",
39
+ "config/routes.rb",
40
+ "lib/bookyt_projects.rb",
41
+ "lib/bookyt_projects/navigation.rb",
42
+ "lib/bookyt_projects/railtie.rb",
43
+ "test/helper.rb",
44
+ "test/test_bookyt_projects.rb"
45
+ ]
46
+ s.homepage = %q{http://github.com/raskhadafi/bookyt_projects}
47
+ s.licenses = [%q{MIT}]
48
+ s.require_paths = [%q{lib}]
49
+ s.rubygems_version = %q{1.8.8}
50
+ s.summary = %q{Rails engine for project management}
51
+
52
+ if s.respond_to? :specification_version then
53
+ s.specification_version = 3
54
+
55
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<rails>, ["~> 3.1.0.rc"])
57
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
58
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
59
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
60
+ s.add_development_dependency(%q<rcov>, [">= 0"])
61
+ else
62
+ s.add_dependency(%q<rails>, ["~> 3.1.0.rc"])
63
+ s.add_dependency(%q<shoulda>, [">= 0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ end
68
+ else
69
+ s.add_dependency(%q<rails>, ["~> 3.1.0.rc"])
70
+ s.add_dependency(%q<shoulda>, [">= 0"])
71
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
72
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
73
+ s.add_dependency(%q<rcov>, [">= 0"])
74
+ end
75
+ end
76
+
@@ -0,0 +1,17 @@
1
+ de:
2
+ activerecord:
3
+ models:
4
+ project: Projekte
5
+ project_state: Projektstatus
6
+ attributes:
7
+ project:
8
+ name: Bezeichnung
9
+ comment: Kommentar
10
+ from: Von
11
+ to: Bis
12
+ project_state: Status
13
+ project_state_id: Status
14
+ client: Kunde
15
+ client_id: Kunde
16
+ project_state:
17
+ name: Bezeichnung
data/config/routes.rb ADDED
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+ resources :projects
3
+ resources :project_states
4
+ end
@@ -0,0 +1,12 @@
1
+ module BookytProjects
2
+ module Navigation
3
+ def setup_bookyt_projects(navigation)
4
+ navigation.item :projects, t_model(Project), projects_path, :if => Proc.new { user_signed_in? } do |projects|
5
+ projects.item :project_index, t_title(:index, Project), projects_path, :highlights_on => /\/projects($|\/[0-9]*($|\/.*))/
6
+ projects.item :new_project, t_title(:new, Project), new_project_path
7
+ projects.item :project_states, t_model(ProjectState), project_states_path, :highlights_on => /\/project_states($|\/([0-9]*|new)($|\/.*))/
8
+ # projects.item :new_project_state, t_title(:new, ProjectState), new_project_state_path
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ require 'bookyt_projects'
2
+ require 'rails'
3
+
4
+ module BookytProject
5
+ class Railtie < Rails::Engine
6
+
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ require 'bookyt_projects/railtie' if defined?(::Rails::Railtie)
2
+
3
+ require 'bookyt_projects/navigation'
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
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 'bookyt_projects'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestBookytProjects < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bookyt_projects
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Roman Simecek
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-09-09 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ hash: 7712034
27
+ segments:
28
+ - 3
29
+ - 1
30
+ - 0
31
+ - rc
32
+ version: 3.1.0.rc
33
+ version_requirements: *id001
34
+ name: rails
35
+ prerelease: false
36
+ type: :runtime
37
+ - !ruby/object:Gem::Dependency
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ version_requirements: *id002
48
+ name: shoulda
49
+ prerelease: false
50
+ type: :development
51
+ - !ruby/object:Gem::Dependency
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ hash: 23
58
+ segments:
59
+ - 1
60
+ - 0
61
+ - 0
62
+ version: 1.0.0
63
+ version_requirements: *id003
64
+ name: bundler
65
+ prerelease: false
66
+ type: :development
67
+ - !ruby/object:Gem::Dependency
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ hash: 7
74
+ segments:
75
+ - 1
76
+ - 6
77
+ - 4
78
+ version: 1.6.4
79
+ version_requirements: *id004
80
+ name: jeweler
81
+ prerelease: false
82
+ type: :development
83
+ - !ruby/object:Gem::Dependency
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ version_requirements: *id005
94
+ name: rcov
95
+ prerelease: false
96
+ type: :development
97
+ description: Rails engine for project management it's used to extend the functionallity of bookyt.
98
+ email: roman.simecek@cyt.ch
99
+ executables: []
100
+
101
+ extensions: []
102
+
103
+ extra_rdoc_files:
104
+ - LICENSE.txt
105
+ - README.rdoc
106
+ files:
107
+ - .document
108
+ - Gemfile
109
+ - Gemfile.lock
110
+ - LICENSE.txt
111
+ - README.rdoc
112
+ - Rakefile
113
+ - VERSION
114
+ - app/assets/stylesheets/bookyt_projects.sass
115
+ - app/controllers/project_states_controller.rb
116
+ - app/controllers/projects_controller.rb
117
+ - app/models/project.rb
118
+ - app/models/project_state.rb
119
+ - app/views/project_states/_form.html.haml
120
+ - app/views/project_states/new.html.haml
121
+ - app/views/projects/_form.html.haml
122
+ - app/views/projects/_list.html.haml
123
+ - app/views/projects/new.html.haml
124
+ - bookyt_projects.gemspec
125
+ - config/locales/de.yml
126
+ - config/routes.rb
127
+ - lib/bookyt_projects.rb
128
+ - lib/bookyt_projects/navigation.rb
129
+ - lib/bookyt_projects/railtie.rb
130
+ - test/helper.rb
131
+ - test/test_bookyt_projects.rb
132
+ homepage: http://github.com/raskhadafi/bookyt_projects
133
+ licenses:
134
+ - MIT
135
+ post_install_message:
136
+ rdoc_options: []
137
+
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
156
+ - 0
157
+ version: "0"
158
+ requirements: []
159
+
160
+ rubyforge_project:
161
+ rubygems_version: 1.8.8
162
+ signing_key:
163
+ specification_version: 3
164
+ summary: Rails engine for project management
165
+ test_files: []
166
+