backlog 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Rakefile +2 -1
- data/app/controllers/application.rb +55 -8
- data/app/controllers/groups_controller.rb +62 -0
- data/app/controllers/periods_controller.rb +13 -55
- data/app/controllers/tasks_controller.rb +9 -5
- data/app/controllers/works_controller.rb +43 -6
- data/app/helpers/application_helper.rb +20 -2
- data/app/helpers/groups_helper.rb +2 -0
- data/app/models/backlog.rb +19 -10
- data/app/models/estimate.rb +2 -1
- data/app/models/group.rb +11 -0
- data/app/models/party.rb +3 -0
- data/app/models/period.rb +43 -6
- data/app/models/task.rb +27 -14
- data/app/models/user.rb +37 -8
- data/app/models/work.rb +4 -6
- data/app/views/backlogs/_name_list.rhtml +5 -0
- data/app/views/backlogs/show.rhtml +4 -4
- data/app/views/groups/_form.rhtml +7 -0
- data/app/views/groups/edit.rhtml +31 -0
- data/app/views/groups/list.rhtml +27 -0
- data/app/views/groups/new.rhtml +8 -0
- data/app/views/layouts/wide.rhtml +2 -2
- data/app/views/periods/_burn_down_chart.rhtml +1 -1
- data/app/views/periods/_form.rhtml +13 -9
- data/app/views/periods/_show_active.rhtml +6 -12
- data/app/views/periods/_title.rhtml +4 -5
- data/app/views/periods/edit.rhtml +1 -1
- data/app/views/periods/new.rhtml +1 -1
- data/app/views/periods/show.rhtml +10 -6
- data/app/views/tasks/_backlog_header.rhtml +22 -0
- data/app/views/tasks/_description_list.rhtml +5 -0
- data/app/views/tasks/_form.rhtml +26 -7
- data/app/views/tasks/_task.rhtml +4 -4
- data/app/views/tasks/edit.rhtml +2 -3
- data/app/views/tasks/list_started.rhtml +1 -0
- data/app/views/tasks/new.rhtml +2 -2
- data/app/views/works/_buttons.rhtml +3 -0
- data/app/views/works/_form.rhtml +15 -10
- data/app/views/works/daily_work_sheet.rhtml +30 -18
- data/app/views/works/edit.rhtml +4 -4
- data/app/views/works/list.rhtml +2 -2
- data/app/views/works/new.rhtml +3 -2
- data/app/views/works/weekly_work_sheet.rhtml +2 -2
- data/bin/backlog +2 -0
- data/bin/backlog_init.d_kubosch_production +27 -0
- data/bin/copy_production2development.rb +33 -0
- data/config/database.yml +13 -7
- data/config/deploy_kubosch.rb +1 -0
- data/config/environment.rb +2 -0
- data/config/environments/development_mysql.rb +27 -0
- data/config/environments/kubosch_production_mysql.rb +21 -0
- data/config/routes.rb +1 -1
- data/db/migrate/{001_tasks.rb → 001_create_tasks.rb} +1 -1
- data/db/migrate/{002_backlogs.rb → 002_create_backlogs.rb} +2 -2
- data/db/migrate/003_add_estimation_points.rb +1 -1
- data/db/migrate/004_add_period.rb +2 -2
- data/db/migrate/013_create_estimates.rb +1 -1
- data/db/migrate/015_add_user_option.rb +9 -5
- data/db/migrate/017_insert_datek_projects.rb +13 -10
- data/db/migrate/018_create_groups.rb +115 -0
- data/db/schema.rb +72 -12
- data/lang/en.yaml +7 -0
- data/lang/no.yaml +7 -0
- data/lib/big_decimal_yaml_fix.rb +27 -0
- data/lib/class_table_inheritance.rb +163 -0
- data/lib/tasks/backup.rake +92 -0
- data/public/images/person.org.png +0 -0
- data/public/images/person.png +0 -0
- data/public/stylesheets/backlog.css +3 -1
- data/public/stylesheets/mwrt002.css +1 -1
- data/test/fixtures/groups.yml +6 -0
- data/test/fixtures/parties.yml +31 -0
- data/test/fixtures/periods.yml +2 -2
- data/test/fixtures/tasks.yml +2 -0
- data/test/fixtures/users.yml +6 -6
- data/test/functional/backlogs_controller_test.rb +1 -1
- data/test/functional/groups_controller_test.rb +120 -0
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/tasks_controller_test.rb +16 -1
- data/test/functional/user_controller_test.rb +8 -2
- data/test/test_helper.rb +5 -0
- data/test/unit/big_decimal_yaml_fix_test.rb +14 -0
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/group_test.rb +10 -0
- data/test/unit/user_test.rb +56 -44
- data/tmp/sessions/ruby_sess.22dec3e9df47fb4e +0 -0
- data/tmp/sessions/ruby_sess.8037e0ab58cbcf1a +0 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +35 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
- data/vendor/rails/{actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml → railties/configs/empty.log} +0 -0
- metadata +36 -105
- data/backlog.gemspec +0 -21
- data/vendor/rails/actionwebservice/CHANGELOG +0 -265
- data/vendor/rails/actionwebservice/MIT-LICENSE +0 -21
- data/vendor/rails/actionwebservice/README +0 -364
- data/vendor/rails/actionwebservice/Rakefile +0 -171
- data/vendor/rails/actionwebservice/TODO +0 -32
- data/vendor/rails/actionwebservice/examples/googlesearch/README +0 -143
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +0 -57
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +0 -108
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb +0 -7
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb +0 -58
- data/vendor/rails/actionwebservice/examples/metaWeblog/README +0 -17
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +0 -60
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +0 -34
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +0 -67
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +0 -48
- data/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +0 -16
- data/vendor/rails/actionwebservice/install.rb +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service.rb +0 -66
- data/vendor/rails/actionwebservice/lib/action_web_service/api.rb +0 -301
- data/vendor/rails/actionwebservice/lib/action_web_service/base.rb +0 -42
- data/vendor/rails/actionwebservice/lib/action_web_service/casting.rb +0 -138
- data/vendor/rails/actionwebservice/lib/action_web_service/client.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb +0 -28
- data/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb +0 -113
- data/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +0 -58
- data/vendor/rails/actionwebservice/lib/action_web_service/container.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb +0 -93
- data/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb +0 -86
- data/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb +0 -69
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb +0 -2
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +0 -207
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +0 -379
- data/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb +0 -202
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb +0 -4
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb +0 -112
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb +0 -37
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +0 -176
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +0 -235
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +0 -122
- data/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb +0 -283
- data/vendor/rails/actionwebservice/lib/action_web_service/struct.rb +0 -68
- data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +0 -26
- data/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb +0 -226
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb +0 -65
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb +0 -6
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb +0 -29
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb +0 -110
- data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +0 -9
- data/vendor/rails/actionwebservice/setup.rb +0 -1379
- data/vendor/rails/actionwebservice/test/abstract_client.rb +0 -183
- data/vendor/rails/actionwebservice/test/abstract_dispatcher.rb +0 -551
- data/vendor/rails/actionwebservice/test/abstract_unit.rb +0 -45
- data/vendor/rails/actionwebservice/test/api_test.rb +0 -102
- data/vendor/rails/actionwebservice/test/apis/auto_load_api.rb +0 -3
- data/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb +0 -2
- data/vendor/rails/actionwebservice/test/base_test.rb +0 -42
- data/vendor/rails/actionwebservice/test/casting_test.rb +0 -86
- data/vendor/rails/actionwebservice/test/client_soap_test.rb +0 -153
- data/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb +0 -152
- data/vendor/rails/actionwebservice/test/container_test.rb +0 -73
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb +0 -137
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +0 -59
- data/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql +0 -8
- data/vendor/rails/actionwebservice/test/fixtures/users.yml +0 -12
- data/vendor/rails/actionwebservice/test/gencov +0 -3
- data/vendor/rails/actionwebservice/test/invocation_test.rb +0 -185
- data/vendor/rails/actionwebservice/test/run +0 -6
- data/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb +0 -146
- data/vendor/rails/actionwebservice/test/struct_test.rb +0 -52
- data/vendor/rails/actionwebservice/test/test_invoke_test.rb +0 -112
@@ -1,68 +0,0 @@
|
|
1
|
-
module ActionWebService
|
2
|
-
# To send structured types across the wire, derive from ActionWebService::Struct,
|
3
|
-
# and use +member+ to declare structure members.
|
4
|
-
#
|
5
|
-
# ActionWebService::Struct should be used in method signatures when you want to accept or return
|
6
|
-
# structured types that have no Active Record model class representations, or you don't
|
7
|
-
# want to expose your entire Active Record model to remote callers.
|
8
|
-
#
|
9
|
-
# === Example
|
10
|
-
#
|
11
|
-
# class Person < ActionWebService::Struct
|
12
|
-
# member :id, :int
|
13
|
-
# member :firstnames, [:string]
|
14
|
-
# member :lastname, :string
|
15
|
-
# member :email, :string
|
16
|
-
# end
|
17
|
-
# person = Person.new(:id => 5, :firstname => 'john', :lastname => 'doe')
|
18
|
-
#
|
19
|
-
# Active Record model classes are already implicitly supported in method
|
20
|
-
# signatures.
|
21
|
-
class Struct
|
22
|
-
# Action WebService Struct subclasses should be reloaded by the dispatcher in Rails
|
23
|
-
# when Dependencies.mechanism = :load.
|
24
|
-
include Reloadable::Deprecated
|
25
|
-
|
26
|
-
# If a Hash is given as argument to an ActionWebService::Struct constructor,
|
27
|
-
# it can contain initial values for the structure member.
|
28
|
-
def initialize(values={})
|
29
|
-
if values.is_a?(Hash)
|
30
|
-
values.map{|k,v| __send__('%s=' % k.to_s, v)}
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# The member with the given name
|
35
|
-
def [](name)
|
36
|
-
send(name.to_s)
|
37
|
-
end
|
38
|
-
|
39
|
-
# Iterates through each member
|
40
|
-
def each_pair(&block)
|
41
|
-
self.class.members.each do |name, type|
|
42
|
-
yield name, self.__send__(name)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class << self
|
47
|
-
# Creates a structure member with the specified +name+ and +type+. Generates
|
48
|
-
# accessor methods for reading and writing the member value.
|
49
|
-
def member(name, type)
|
50
|
-
name = name.to_sym
|
51
|
-
type = ActionWebService::SignatureTypes.canonical_signature_entry({ name => type }, 0)
|
52
|
-
write_inheritable_hash("struct_members", name => type)
|
53
|
-
class_eval <<-END
|
54
|
-
def #{name}; @#{name}; end
|
55
|
-
def #{name}=(value); @#{name} = value; end
|
56
|
-
END
|
57
|
-
end
|
58
|
-
|
59
|
-
def members # :nodoc:
|
60
|
-
read_inheritable_attribute("struct_members") || {}
|
61
|
-
end
|
62
|
-
|
63
|
-
def member_type(name) # :nodoc:
|
64
|
-
members[name.to_sym]
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
class Class # :nodoc:
|
2
|
-
def class_inheritable_option(sym, default_value=nil)
|
3
|
-
write_inheritable_attribute sym, default_value
|
4
|
-
class_eval <<-EOS
|
5
|
-
def self.#{sym}(value=nil)
|
6
|
-
if !value.nil?
|
7
|
-
write_inheritable_attribute(:#{sym}, value)
|
8
|
-
else
|
9
|
-
read_inheritable_attribute(:#{sym})
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.#{sym}=(value)
|
14
|
-
write_inheritable_attribute(:#{sym}, value)
|
15
|
-
end
|
16
|
-
|
17
|
-
def #{sym}
|
18
|
-
self.class.#{sym}
|
19
|
-
end
|
20
|
-
|
21
|
-
def #{sym}=(value)
|
22
|
-
self.class.#{sym} = value
|
23
|
-
end
|
24
|
-
EOS
|
25
|
-
end
|
26
|
-
end
|
@@ -1,226 +0,0 @@
|
|
1
|
-
module ActionWebService # :nodoc:
|
2
|
-
# Action Web Service supports the following base types in a signature:
|
3
|
-
#
|
4
|
-
# [<tt>:int</tt>] Represents an integer value, will be cast to an integer using <tt>Integer(value)</tt>
|
5
|
-
# [<tt>:string</tt>] Represents a string value, will be cast to an string using the <tt>to_s</tt> method on an object
|
6
|
-
# [<tt>:base64</tt>] Represents a Base 64 value, will contain the binary bytes of a Base 64 value sent by the caller
|
7
|
-
# [<tt>:bool</tt>] Represents a boolean value, whatever is passed will be cast to boolean (<tt>true</tt>, '1', 'true', 'y', 'yes' are taken to represent true; <tt>false</tt>, '0', 'false', 'n', 'no' and <tt>nil</tt> represent false)
|
8
|
-
# [<tt>:float</tt>] Represents a floating point value, will be cast to a float using <tt>Float(value)</tt>
|
9
|
-
# [<tt>:time</tt>] Represents a timestamp, will be cast to a <tt>Time</tt> object
|
10
|
-
# [<tt>:datetime</tt>] Represents a timestamp, will be cast to a <tt>DateTime</tt> object
|
11
|
-
# [<tt>:date</tt>] Represents a date, will be cast to a <tt>Date</tt> object
|
12
|
-
#
|
13
|
-
# For structured types, you'll need to pass in the Class objects of
|
14
|
-
# ActionWebService::Struct and ActiveRecord::Base derivatives.
|
15
|
-
module SignatureTypes
|
16
|
-
def canonical_signature(signature) # :nodoc:
|
17
|
-
return nil if signature.nil?
|
18
|
-
unless signature.is_a?(Array)
|
19
|
-
raise(ActionWebServiceError, "Expected signature to be an Array")
|
20
|
-
end
|
21
|
-
i = -1
|
22
|
-
signature.map{ |spec| canonical_signature_entry(spec, i += 1) }
|
23
|
-
end
|
24
|
-
|
25
|
-
def canonical_signature_entry(spec, i) # :nodoc:
|
26
|
-
orig_spec = spec
|
27
|
-
name = "param#{i}"
|
28
|
-
if spec.is_a?(Hash)
|
29
|
-
name, spec = spec.keys.first, spec.values.first
|
30
|
-
end
|
31
|
-
type = spec
|
32
|
-
if spec.is_a?(Array)
|
33
|
-
ArrayType.new(orig_spec, canonical_signature_entry(spec[0], 0), name)
|
34
|
-
else
|
35
|
-
type = canonical_type(type)
|
36
|
-
if type.is_a?(Symbol)
|
37
|
-
BaseType.new(orig_spec, type, name)
|
38
|
-
else
|
39
|
-
StructuredType.new(orig_spec, type, name)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def canonical_type(type) # :nodoc:
|
45
|
-
type_name = symbol_name(type) || class_to_type_name(type)
|
46
|
-
type = type_name || type
|
47
|
-
return canonical_type_name(type) if type.is_a?(Symbol)
|
48
|
-
type
|
49
|
-
end
|
50
|
-
|
51
|
-
def canonical_type_name(name) # :nodoc:
|
52
|
-
name = name.to_sym
|
53
|
-
case name
|
54
|
-
when :int, :integer, :fixnum, :bignum
|
55
|
-
:int
|
56
|
-
when :string, :text
|
57
|
-
:string
|
58
|
-
when :base64, :binary
|
59
|
-
:base64
|
60
|
-
when :bool, :boolean
|
61
|
-
:bool
|
62
|
-
when :float, :double
|
63
|
-
:float
|
64
|
-
when :decimal
|
65
|
-
:decimal
|
66
|
-
when :time, :timestamp
|
67
|
-
:time
|
68
|
-
when :datetime
|
69
|
-
:datetime
|
70
|
-
when :date
|
71
|
-
:date
|
72
|
-
else
|
73
|
-
raise(TypeError, "#{name} is not a valid base type")
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def canonical_type_class(type) # :nodoc:
|
78
|
-
type = canonical_type(type)
|
79
|
-
type.is_a?(Symbol) ? type_name_to_class(type) : type
|
80
|
-
end
|
81
|
-
|
82
|
-
def symbol_name(name) # :nodoc:
|
83
|
-
return name.to_sym if name.is_a?(Symbol) || name.is_a?(String)
|
84
|
-
nil
|
85
|
-
end
|
86
|
-
|
87
|
-
def class_to_type_name(klass) # :nodoc:
|
88
|
-
klass = klass.class unless klass.is_a?(Class)
|
89
|
-
if derived_from?(Integer, klass) || derived_from?(Fixnum, klass) || derived_from?(Bignum, klass)
|
90
|
-
:int
|
91
|
-
elsif klass == String
|
92
|
-
:string
|
93
|
-
elsif klass == Base64
|
94
|
-
:base64
|
95
|
-
elsif klass == TrueClass || klass == FalseClass
|
96
|
-
:bool
|
97
|
-
elsif derived_from?(Float, klass) || derived_from?(Precision, klass) || derived_from?(Numeric, klass)
|
98
|
-
:float
|
99
|
-
elsif klass == Time
|
100
|
-
:time
|
101
|
-
elsif klass == DateTime
|
102
|
-
:datetime
|
103
|
-
elsif klass == Date
|
104
|
-
:date
|
105
|
-
else
|
106
|
-
nil
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
def type_name_to_class(name) # :nodoc:
|
111
|
-
case canonical_type_name(name)
|
112
|
-
when :int
|
113
|
-
Integer
|
114
|
-
when :string
|
115
|
-
String
|
116
|
-
when :base64
|
117
|
-
Base64
|
118
|
-
when :bool
|
119
|
-
TrueClass
|
120
|
-
when :float
|
121
|
-
Float
|
122
|
-
when :decimal
|
123
|
-
BigDecimal
|
124
|
-
when :time
|
125
|
-
Time
|
126
|
-
when :date
|
127
|
-
Date
|
128
|
-
when :datetime
|
129
|
-
DateTime
|
130
|
-
else
|
131
|
-
nil
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
def derived_from?(ancestor, child) # :nodoc:
|
136
|
-
child.ancestors.include?(ancestor)
|
137
|
-
end
|
138
|
-
|
139
|
-
module_function :type_name_to_class
|
140
|
-
module_function :class_to_type_name
|
141
|
-
module_function :symbol_name
|
142
|
-
module_function :canonical_type_class
|
143
|
-
module_function :canonical_type_name
|
144
|
-
module_function :canonical_type
|
145
|
-
module_function :canonical_signature_entry
|
146
|
-
module_function :canonical_signature
|
147
|
-
module_function :derived_from?
|
148
|
-
end
|
149
|
-
|
150
|
-
class BaseType # :nodoc:
|
151
|
-
include SignatureTypes
|
152
|
-
|
153
|
-
attr :spec
|
154
|
-
attr :type
|
155
|
-
attr :type_class
|
156
|
-
attr :name
|
157
|
-
|
158
|
-
def initialize(spec, type, name)
|
159
|
-
@spec = spec
|
160
|
-
@type = canonical_type(type)
|
161
|
-
@type_class = canonical_type_class(@type)
|
162
|
-
@name = name
|
163
|
-
end
|
164
|
-
|
165
|
-
def custom?
|
166
|
-
false
|
167
|
-
end
|
168
|
-
|
169
|
-
def array?
|
170
|
-
false
|
171
|
-
end
|
172
|
-
|
173
|
-
def structured?
|
174
|
-
false
|
175
|
-
end
|
176
|
-
|
177
|
-
def human_name(show_name=true)
|
178
|
-
type_type = array? ? element_type.type.to_s : self.type.to_s
|
179
|
-
str = array? ? (type_type + '[]') : type_type
|
180
|
-
show_name ? (str + " " + name.to_s) : str
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
class ArrayType < BaseType # :nodoc:
|
185
|
-
attr :element_type
|
186
|
-
|
187
|
-
def initialize(spec, element_type, name)
|
188
|
-
super(spec, Array, name)
|
189
|
-
@element_type = element_type
|
190
|
-
end
|
191
|
-
|
192
|
-
def custom?
|
193
|
-
true
|
194
|
-
end
|
195
|
-
|
196
|
-
def array?
|
197
|
-
true
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
class StructuredType < BaseType # :nodoc:
|
202
|
-
def each_member
|
203
|
-
if @type_class.respond_to?(:members)
|
204
|
-
@type_class.members.each do |name, type|
|
205
|
-
yield name, type
|
206
|
-
end
|
207
|
-
elsif @type_class.respond_to?(:columns)
|
208
|
-
i = -1
|
209
|
-
@type_class.columns.each do |column|
|
210
|
-
yield column.name, canonical_signature_entry(column.type, i += 1)
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
def custom?
|
216
|
-
true
|
217
|
-
end
|
218
|
-
|
219
|
-
def structured?
|
220
|
-
true
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
class Base64 < String # :nodoc:
|
225
|
-
end
|
226
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title><%= @scaffold_class.wsdl_service_name %> Web Service</title>
|
4
|
-
<style>
|
5
|
-
body { background-color: #fff; color: #333; }
|
6
|
-
|
7
|
-
body, p, ol, ul, td {
|
8
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
9
|
-
font-size: 13px;
|
10
|
-
line-height: 18px;
|
11
|
-
}
|
12
|
-
|
13
|
-
pre {
|
14
|
-
background-color: #eee;
|
15
|
-
padding: 10px;
|
16
|
-
font-size: 11px;
|
17
|
-
}
|
18
|
-
|
19
|
-
a { color: #000; }
|
20
|
-
a:visited { color: #666; }
|
21
|
-
a:hover { color: #fff; background-color:#000; }
|
22
|
-
|
23
|
-
.fieldWithErrors {
|
24
|
-
padding: 2px;
|
25
|
-
background-color: red;
|
26
|
-
display: table;
|
27
|
-
}
|
28
|
-
|
29
|
-
#errorExplanation {
|
30
|
-
width: 400px;
|
31
|
-
border: 2px solid red;
|
32
|
-
padding: 7px;
|
33
|
-
padding-bottom: 12px;
|
34
|
-
margin-bottom: 20px;
|
35
|
-
background-color: #f0f0f0;
|
36
|
-
}
|
37
|
-
|
38
|
-
#errorExplanation h2 {
|
39
|
-
text-align: left;
|
40
|
-
font-weight: bold;
|
41
|
-
padding: 5px 5px 5px 15px;
|
42
|
-
font-size: 12px;
|
43
|
-
margin: -7px;
|
44
|
-
background-color: #c00;
|
45
|
-
color: #fff;
|
46
|
-
}
|
47
|
-
|
48
|
-
#errorExplanation p {
|
49
|
-
color: #333;
|
50
|
-
margin-bottom: 0;
|
51
|
-
padding: 5px;
|
52
|
-
}
|
53
|
-
|
54
|
-
#errorExplanation ul li {
|
55
|
-
font-size: 12px;
|
56
|
-
list-style: square;
|
57
|
-
}
|
58
|
-
</style>
|
59
|
-
</head>
|
60
|
-
<body>
|
61
|
-
|
62
|
-
<%= @content_for_layout %>
|
63
|
-
|
64
|
-
</body>
|
65
|
-
</html>
|
File without changes
|
data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
<h4>Method Invocation Details for <em><%= @scaffold_service %>#<%= @scaffold_method.public_name %></em></h4>
|
2
|
-
|
3
|
-
<% form_tag(:action => @scaffold_action_name + '_submit') do -%>
|
4
|
-
<%= hidden_field_tag "service", @scaffold_service.name %>
|
5
|
-
<%= hidden_field_tag "method", @scaffold_method.public_name %>
|
6
|
-
|
7
|
-
<p>
|
8
|
-
<label for="protocol">Protocol:</label><br />
|
9
|
-
<%= select_tag 'protocol', options_for_select([['SOAP', 'soap'], ['XML-RPC', 'xmlrpc']], params['protocol']) %>
|
10
|
-
</p>
|
11
|
-
|
12
|
-
<% if @scaffold_method.expects %>
|
13
|
-
|
14
|
-
<strong>Method Parameters:</strong><br />
|
15
|
-
<% @scaffold_method.expects.each_with_index do |type, i| %>
|
16
|
-
<p>
|
17
|
-
<label for="method_params[<%= i %>]"><%= method_parameter_label(type.name, type) %> </label><br />
|
18
|
-
<%= method_parameter_input_fields(@scaffold_method, type, "method_params", i) %>
|
19
|
-
</p>
|
20
|
-
<% end %>
|
21
|
-
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<%= submit_tag "Invoke" %>
|
25
|
-
<% end -%>
|
26
|
-
|
27
|
-
<p>
|
28
|
-
<%= link_to "Back", :action => @scaffold_action_name %>
|
29
|
-
</p>
|
data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
DELETED
File without changes
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<h4>Method Invocation Result for <em><%= @scaffold_service %>#<%= @scaffold_method.public_name %></em></h4>
|
2
|
-
|
3
|
-
<p>
|
4
|
-
Invocation took <tt><%= '%f' % @method_elapsed %></tt> seconds
|
5
|
-
</p>
|
6
|
-
|
7
|
-
<p>
|
8
|
-
<strong>Return Value:</strong><br />
|
9
|
-
<pre>
|
10
|
-
<%= h @method_return_value.inspect %>
|
11
|
-
</pre>
|
12
|
-
</p>
|
13
|
-
|
14
|
-
<p>
|
15
|
-
<strong>Request XML:</strong><br />
|
16
|
-
<pre>
|
17
|
-
<%= h @method_request_xml %>
|
18
|
-
</pre>
|
19
|
-
</p>
|
20
|
-
|
21
|
-
<p>
|
22
|
-
<strong>Response XML:</strong><br />
|
23
|
-
<pre>
|
24
|
-
<%= h @method_response_xml %>
|
25
|
-
</pre>
|
26
|
-
</p>
|
27
|
-
|
28
|
-
<p>
|
29
|
-
<%= link_to "Back", :action => @scaffold_action_name + '_method_params', :method => @scaffold_method.public_name, :service => @scaffold_service.name %>
|
30
|
-
</p>
|