rhodes-framework 1.0.10 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/Manifest.txt +159 -30
  2. data/Rakefile +3 -19
  3. data/lib/erb.rb +1 -1
  4. data/lib/rho/rho.rb +94 -107
  5. data/lib/rho/rhofsconnector.rb +4 -0
  6. data/lib/rho/rhoutils.rb +26 -0
  7. data/lib/rho/rhoviewhelpers.rb +1 -1
  8. data/lib/rhodes.rb +2 -2
  9. data/lib/rhoframework.rb +9 -9
  10. data/lib/rhom/rhom.rb +1 -1
  11. data/lib/rhom/rhom_db_adapter.rb +36 -15
  12. data/lib/rhom/rhom_db_adapterME.rb +2 -3
  13. data/lib/rhom/rhom_object.rb +14 -2
  14. data/lib/rhom/rhom_object_factory.rb +42 -11
  15. data/lib/version.rb +2 -2
  16. data/spec/README +1 -0
  17. data/spec/Rakefile +1 -0
  18. data/spec/{configs/account.rb → app/Account/config.rb} +0 -0
  19. data/spec/{configs/case.rb → app/Case/config.rb} +0 -0
  20. data/spec/app/Question/config.rb +3 -0
  21. data/spec/app/Settings/controller.rb +10 -0
  22. data/spec/app/Settings/index.erb +11 -0
  23. data/spec/app/SpecRunner/controller.rb +15 -0
  24. data/spec/app/SpecRunner/index.erb +14 -0
  25. data/spec/app/application.rb +4 -0
  26. data/spec/app/index.erb +17 -0
  27. data/spec/app/layout.erb +27 -0
  28. data/spec/app/loading.html +11 -0
  29. data/spec/app/mspec.rb +11 -0
  30. data/spec/app/mspec/expectations.rb +2 -0
  31. data/spec/app/mspec/expectations/expectations.rb +17 -0
  32. data/spec/app/mspec/expectations/should.rb +25 -0
  33. data/spec/app/mspec/fileutils.rb +1590 -0
  34. data/spec/app/mspec/guards.rb +16 -0
  35. data/spec/app/mspec/guards/background.rb +21 -0
  36. data/spec/app/mspec/guards/bug.rb +24 -0
  37. data/spec/app/mspec/guards/compliance.rb +37 -0
  38. data/spec/app/mspec/guards/conflict.rb +18 -0
  39. data/spec/app/mspec/guards/endian.rb +44 -0
  40. data/spec/app/mspec/guards/extensions.rb +20 -0
  41. data/spec/app/mspec/guards/guard.rb +166 -0
  42. data/spec/app/mspec/guards/noncompliance.rb +20 -0
  43. data/spec/app/mspec/guards/platform.rb +43 -0
  44. data/spec/app/mspec/guards/quarantine.rb +17 -0
  45. data/spec/app/mspec/guards/runner.rb +34 -0
  46. data/spec/app/mspec/guards/superuser.rb +17 -0
  47. data/spec/app/mspec/guards/support.rb +20 -0
  48. data/spec/app/mspec/guards/tty.rb +20 -0
  49. data/spec/app/mspec/guards/version.rb +38 -0
  50. data/spec/app/mspec/helpers.rb +11 -0
  51. data/spec/app/mspec/helpers/argv.rb +43 -0
  52. data/spec/app/mspec/helpers/bignum.rb +5 -0
  53. data/spec/app/mspec/helpers/const_lookup.rb +9 -0
  54. data/spec/app/mspec/helpers/environment.rb +23 -0
  55. data/spec/app/mspec/helpers/fixture.rb +20 -0
  56. data/spec/app/mspec/helpers/flunk.rb +5 -0
  57. data/spec/app/mspec/helpers/io.rb +17 -0
  58. data/spec/app/mspec/helpers/language_version.rb +20 -0
  59. data/spec/app/mspec/helpers/ruby_exe.rb +123 -0
  60. data/spec/app/mspec/helpers/scratch.rb +17 -0
  61. data/spec/app/mspec/helpers/tmp.rb +32 -0
  62. data/spec/app/mspec/matchers.rb +23 -0
  63. data/spec/app/mspec/matchers/base.rb +95 -0
  64. data/spec/app/mspec/matchers/be_an_instance_of.rb +26 -0
  65. data/spec/app/mspec/matchers/be_ancestor_of.rb +24 -0
  66. data/spec/app/mspec/matchers/be_close.rb +27 -0
  67. data/spec/app/mspec/matchers/be_empty.rb +20 -0
  68. data/spec/app/mspec/matchers/be_false.rb +20 -0
  69. data/spec/app/mspec/matchers/be_kind_of.rb +24 -0
  70. data/spec/app/mspec/matchers/be_nil.rb +20 -0
  71. data/spec/app/mspec/matchers/be_true.rb +20 -0
  72. data/spec/app/mspec/matchers/complain.rb +56 -0
  73. data/spec/app/mspec/matchers/eql.rb +26 -0
  74. data/spec/app/mspec/matchers/equal.rb +26 -0
  75. data/spec/app/mspec/matchers/equal_element.rb +78 -0
  76. data/spec/app/mspec/matchers/equal_utf16.rb +34 -0
  77. data/spec/app/mspec/matchers/have_constant.rb +30 -0
  78. data/spec/app/mspec/matchers/have_instance_method.rb +24 -0
  79. data/spec/app/mspec/matchers/have_method.rb +24 -0
  80. data/spec/app/mspec/matchers/have_private_instance_method.rb +24 -0
  81. data/spec/app/mspec/matchers/include.rb +32 -0
  82. data/spec/app/mspec/matchers/match_yaml.rb +47 -0
  83. data/spec/app/mspec/matchers/method.rb +14 -0
  84. data/spec/app/mspec/matchers/output.rb +67 -0
  85. data/spec/app/mspec/matchers/output_to_fd.rb +71 -0
  86. data/spec/app/mspec/matchers/raise_error.rb +48 -0
  87. data/spec/app/mspec/matchers/respond_to.rb +24 -0
  88. data/spec/app/mspec/matchers/stringsymboladapter.rb +8 -0
  89. data/spec/app/mspec/mocks.rb +3 -0
  90. data/spec/app/mspec/mocks/mock.rb +159 -0
  91. data/spec/app/mspec/mocks/object.rb +20 -0
  92. data/spec/app/mspec/mocks/proxy.rb +136 -0
  93. data/spec/app/mspec/pp.rb +893 -0
  94. data/spec/app/mspec/runner.rb +15 -0
  95. data/spec/app/mspec/runner/actions.rb +8 -0
  96. data/spec/app/mspec/runner/actions/debug.rb +17 -0
  97. data/spec/app/mspec/runner/actions/filter.rb +40 -0
  98. data/spec/app/mspec/runner/actions/gdb.rb +17 -0
  99. data/spec/app/mspec/runner/actions/tag.rb +133 -0
  100. data/spec/app/mspec/runner/actions/taglist.rb +56 -0
  101. data/spec/app/mspec/runner/actions/tagpurge.rb +56 -0
  102. data/spec/app/mspec/runner/actions/tally.rb +116 -0
  103. data/spec/app/mspec/runner/actions/timer.rb +22 -0
  104. data/spec/app/mspec/runner/context.rb +188 -0
  105. data/spec/app/mspec/runner/example.rb +34 -0
  106. data/spec/app/mspec/runner/exception.rb +43 -0
  107. data/spec/app/mspec/runner/filters.rb +4 -0
  108. data/spec/app/mspec/runner/filters/match.rb +22 -0
  109. data/spec/app/mspec/runner/filters/profile.rb +54 -0
  110. data/spec/app/mspec/runner/filters/regexp.rb +7 -0
  111. data/spec/app/mspec/runner/filters/tag.rb +29 -0
  112. data/spec/app/mspec/runner/formatters.rb +10 -0
  113. data/spec/app/mspec/runner/formatters/describe.rb +24 -0
  114. data/spec/app/mspec/runner/formatters/dotted.rb +98 -0
  115. data/spec/app/mspec/runner/formatters/file.rb +19 -0
  116. data/spec/app/mspec/runner/formatters/html.rb +81 -0
  117. data/spec/app/mspec/runner/formatters/method.rb +93 -0
  118. data/spec/app/mspec/runner/formatters/specdoc.rb +41 -0
  119. data/spec/app/mspec/runner/formatters/spinner.rb +99 -0
  120. data/spec/app/mspec/runner/formatters/summary.rb +11 -0
  121. data/spec/app/mspec/runner/formatters/unit.rb +21 -0
  122. data/spec/app/mspec/runner/formatters/yaml.rb +44 -0
  123. data/spec/app/mspec/runner/mspec.rb +361 -0
  124. data/spec/app/mspec/runner/object.rb +24 -0
  125. data/spec/app/mspec/runner/shared.rb +12 -0
  126. data/spec/app/mspec/runner/tag.rb +32 -0
  127. data/spec/app/mspec/utils/name_map.rb +129 -0
  128. data/spec/app/mspec/utils/options.rb +441 -0
  129. data/spec/app/mspec/utils/ruby_name.rb +8 -0
  130. data/spec/app/mspec/utils/script.rb +220 -0
  131. data/spec/app/mspec/utils/version.rb +53 -0
  132. data/spec/app/mspec/version.rb +5 -0
  133. data/spec/app/spec/fixtures/client_info.txt +2 -0
  134. data/spec/app/spec/fixtures/object_values.txt +90 -0
  135. data/spec/{rho_controller_spec.rb → app/spec/rho_controller_spec.rb} +4 -7
  136. data/spec/{rho_spec.rb → app/spec/rho_spec.rb} +15 -36
  137. data/spec/{rhom_object_factory_spec.rb → app/spec/rhom_object_factory_spec.rb} +108 -72
  138. data/spec/{rhom_spec.rb → app/spec/rhom_spec.rb} +8 -4
  139. data/spec/app/spec/spec_helper.rb +15 -0
  140. data/spec/app/spec/webview_spec.rb +27 -0
  141. data/spec/app/spec_runner.rb +26 -0
  142. data/spec/build.yml +28 -0
  143. data/spec/public/css/base.css +39 -0
  144. data/spec/public/css/blackberry.css +99 -0
  145. data/spec/public/css/iphone.css +392 -0
  146. data/spec/public/css/rho.css +3 -0
  147. data/spec/public/css/xhtml.css +114 -0
  148. data/spec/public/images/IUI_LICENSE.txt +21 -0
  149. data/spec/public/images/backButton.png +0 -0
  150. data/spec/public/images/blueButton.png +0 -0
  151. data/spec/public/images/cancel.png +0 -0
  152. data/spec/public/images/grayButton.png +0 -0
  153. data/spec/public/images/iui-logo-touch-icon.png +0 -0
  154. data/spec/public/images/listArrow.png +0 -0
  155. data/spec/public/images/listArrowSel.png +0 -0
  156. data/spec/public/images/listGroup.png +0 -0
  157. data/spec/public/images/loading.gif +0 -0
  158. data/spec/public/images/pinstripes.png +0 -0
  159. data/spec/public/images/right_button.png +0 -0
  160. data/spec/public/images/selection.png +0 -0
  161. data/spec/public/images/thumb.png +0 -0
  162. data/spec/public/images/toggle.png +0 -0
  163. data/spec/public/images/toggleOn.png +0 -0
  164. data/spec/public/images/toolButton.png +0 -0
  165. data/spec/public/images/toolButton_new.png +0 -0
  166. data/spec/public/images/toolbar.png +0 -0
  167. data/spec/public/images/whiteButton.png +0 -0
  168. data/spec/public/js/application.js +1 -0
  169. data/spec/public/js/jquery-1.2.6.min.js +32 -0
  170. data/spec/public/js/rho.js +4 -0
  171. data/spec/public/js/rhogeolocation-wm.js +59 -0
  172. data/spec/public/js/rhogeolocation.js +11 -0
  173. data/spec/rhoconfig.txt +19 -0
  174. metadata +169 -39
  175. data/History.txt +0 -37
  176. data/README.rdoc +0 -2
  177. data/lib/TestServe.rb +0 -9
  178. data/res/sqlite3/constants.rb +0 -49
  179. data/res/sqlite3/database.rb +0 -715
  180. data/res/sqlite3/driver/dl/api.rb +0 -154
  181. data/res/sqlite3/driver/dl/driver.rb +0 -307
  182. data/res/sqlite3/driver/native/driver.rb +0 -257
  183. data/res/sqlite3/errors.rb +0 -68
  184. data/res/sqlite3/pragmas.rb +0 -271
  185. data/res/sqlite3/resultset.rb +0 -176
  186. data/res/sqlite3/sqlite3_api.rb +0 -0
  187. data/res/sqlite3/statement.rb +0 -230
  188. data/res/sqlite3/translator.rb +0 -109
  189. data/res/sqlite3/value.rb +0 -57
  190. data/res/sqlite3/version.rb +0 -14
  191. data/rhodes.gemspec +0 -18
  192. data/spec/app_manifest.txt +0 -4
  193. data/spec/configs/contact.rb +0 -3
  194. data/spec/configs/employee.rb +0 -3
  195. data/spec/spec.opts +0 -1
  196. data/spec/spec_helper.rb +0 -49
  197. data/spec/stubs.rb +0 -39
  198. data/spec/syncdbtest.sqlite +0 -0
@@ -0,0 +1,8 @@
1
+ unless Object.const_defined?(:RUBY_NAME) and RUBY_NAME
2
+ if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE
3
+ RUBY_NAME = RUBY_ENGINE
4
+ else
5
+ require 'rbconfig'
6
+ RUBY_NAME = Config::CONFIG["RUBY_INSTALL_NAME"] || Config::CONFIG["ruby_install_name"]
7
+ end
8
+ end
@@ -0,0 +1,220 @@
1
+ require 'mspec/guards/guard'
2
+ require 'mspec/runner/formatters/dotted'
3
+
4
+ # MSpecScript provides a skeleton for all the MSpec runner scripts.
5
+
6
+ class MSpecScript
7
+ # Returns the config object. Maintained at the class
8
+ # level to easily enable simple config files. See the
9
+ # class method +set+.
10
+ def self.config
11
+ @config ||= {
12
+ :path => ['.', 'spec'],
13
+ :config_ext => '.mspec'
14
+ }
15
+ end
16
+
17
+ # Associates +value+ with +key+ in the config object. Enables
18
+ # simple config files of the form:
19
+ #
20
+ # class MSpecScript
21
+ # set :target, "ruby"
22
+ # set :files, ["one_spec.rb", "two_spec.rb"]
23
+ # end
24
+ def self.set(key, value)
25
+ config[key] = value
26
+ end
27
+
28
+ # Gets the value of +key+ from the config object. Simplifies
29
+ # getting values in a config file:
30
+ #
31
+ # class MSpecScript
32
+ # set :a, 1
33
+ # set :b, 2
34
+ # set :c, get(:a) + get(:b)
35
+ # end
36
+ def self.get(key)
37
+ config[key]
38
+ end
39
+
40
+ def initialize
41
+ config[:formatter] = nil
42
+ config[:includes] = []
43
+ config[:excludes] = []
44
+ config[:patterns] = []
45
+ config[:xpatterns] = []
46
+ config[:tags] = []
47
+ config[:xtags] = []
48
+ config[:profiles] = []
49
+ config[:xprofiles] = []
50
+ config[:atags] = []
51
+ config[:astrings] = []
52
+ config[:ltags] = []
53
+ config[:abort] = true
54
+ end
55
+
56
+ # Returns the config object maintained by the instance's class.
57
+ # See the class methods +set+ and +config+.
58
+ def config
59
+ MSpecScript.config
60
+ end
61
+
62
+ # Returns +true+ if the file was located in +config[:path]+,
63
+ # possibly appending +config[:config_ext]. Returns +false+
64
+ # otherwise.
65
+ def load(target)
66
+ names = [target]
67
+ unless target[-6..-1] == config[:config_ext]
68
+ names << target + config[:config_ext]
69
+ end
70
+
71
+ names.each do |name|
72
+ return Kernel.load(name) if File.exist?(File.expand_path(name))
73
+
74
+ config[:path].each do |dir|
75
+ file = File.join dir, name
76
+ return Kernel.load(file) if File.exist? file
77
+ end
78
+ end
79
+
80
+ false
81
+ end
82
+
83
+ # Attempts to load a default config file. First tries to load
84
+ # 'default.mspec'. If that fails, attempts to load a config
85
+ # file name constructed from the value of RUBY_ENGINE and the
86
+ # first two numbers in RUBY_VERSION. For example, on MRI 1.8.6,
87
+ # the file name would be 'ruby.1.8.mspec'.
88
+ def load_default
89
+ return if load 'default.mspec'
90
+
91
+ if Object.const_defined?(:RUBY_ENGINE)
92
+ engine = RUBY_ENGINE
93
+ else
94
+ engine = 'ruby'
95
+ end
96
+ load "#{engine}.#{SpecGuard.ruby_version}.mspec"
97
+ end
98
+
99
+ # Callback for enabling custom options. This version is a no-op.
100
+ # Provide an implementation specific version in a config file.
101
+ # Called by #options after the MSpec-provided options are added.
102
+ def custom_options(options)
103
+ options.doc " No custom options registered"
104
+ end
105
+
106
+ # Registers all filters and actions.
107
+ def register
108
+ if config[:formatter].nil?
109
+ config[:formatter] = @files.size < 50 ? DottedFormatter : FileFormatter
110
+ end
111
+
112
+ if config[:formatter]
113
+ formatter = config[:formatter].new(config[:output])
114
+ formatter.register
115
+ MSpec.store :formatter, formatter
116
+ end
117
+
118
+ MatchFilter.new(:include, *config[:includes]).register unless config[:includes].empty?
119
+ MatchFilter.new(:exclude, *config[:excludes]).register unless config[:excludes].empty?
120
+ RegexpFilter.new(:include, *config[:patterns]).register unless config[:patterns].empty?
121
+ RegexpFilter.new(:exclude, *config[:xpatterns]).register unless config[:xpatterns].empty?
122
+ TagFilter.new(:include, *config[:tags]).register unless config[:tags].empty?
123
+ TagFilter.new(:exclude, *config[:xtags]).register unless config[:xtags].empty?
124
+ ProfileFilter.new(:include, *config[:profiles]).register unless config[:profiles].empty?
125
+ ProfileFilter.new(:exclude, *config[:xprofiles]).register unless config[:xprofiles].empty?
126
+
127
+ DebugAction.new(config[:atags], config[:astrings]).register if config[:debugger]
128
+ GdbAction.new(config[:atags], config[:astrings]).register if config[:gdb]
129
+
130
+ custom_register
131
+ end
132
+
133
+ # Callback for enabling custom actions, etc. This version is a
134
+ # no-op. Provide an implementation specific version in a config
135
+ # file. Called by #register.
136
+ def custom_register
137
+ end
138
+
139
+ # Sets up signal handlers. Only a handler for SIGINT is
140
+ # registered currently.
141
+ def signals
142
+ if config[:abort]
143
+ Signal.trap "INT" do
144
+ puts "\nProcess aborted!"
145
+ exit! 1
146
+ end
147
+ end
148
+ end
149
+
150
+ # Attempts to resolve +partial+ as a file or directory name in the
151
+ # following order:
152
+ #
153
+ # 1. +partial+
154
+ # 2. +partial+ + "_spec.rb"
155
+ # 3. <tt>File.join(config[:prefix], partial)</tt>
156
+ # 4. <tt>File.join(config[:prefix], partial + "_spec.rb")</tt>
157
+ #
158
+ # If it is a file name, returns the name as an entry in an array.
159
+ # If it is a directory, returns all *_spec.rb files in the
160
+ # directory and subdirectories.
161
+ #
162
+ # If unable to resolve +partial+, returns <tt>Dir[partial]</tt>.
163
+ def entries(partial)
164
+ file = partial + "_spec.iseq"
165
+ patterns = [partial]
166
+ patterns << file
167
+ puts "file: #{file}"
168
+ if config[:prefix]
169
+ patterns << File.join(config[:prefix], partial)
170
+ patterns << File.join(config[:prefix], file)
171
+ end
172
+
173
+ patterns.each do |pattern|
174
+ expanded = File.expand_path(pattern)
175
+ return [pattern] if File.file?(expanded)
176
+
177
+ specs = File.join(pattern, "/**/*_spec.iseq")
178
+ specs = File.expand_path(specs) rescue specs
179
+ return Dir[specs].sort if File.directory?(expanded)
180
+ end
181
+
182
+ Dir[partial]
183
+ end
184
+
185
+ # Resolves each entry in +list+ to a set of files.
186
+ #
187
+ # If the entry has a leading '^' character, the list of files
188
+ # is subtracted from the list of files accumulated to that point.
189
+ #
190
+ # If the entry has a leading ':' character, the corresponding
191
+ # key is looked up in the config object and the entries in the
192
+ # value retrieved are processed through #entries.
193
+ def files(list)
194
+ list.inject([]) do |files, item|
195
+ case item[0]
196
+ when ?^
197
+ files -= entries(item[1..-1])
198
+ when ?:
199
+ key = item[1..-1].to_sym
200
+ files += files(Array(config[key]))
201
+ else
202
+ files += entries(item)
203
+ end
204
+ files
205
+ end
206
+ end
207
+
208
+ # Instantiates an instance and calls the series of methods to
209
+ # invoke the script.
210
+ def self.main
211
+ $VERBOSE = nil unless ENV['OUTPUT_WARNINGS']
212
+ script = new
213
+ script.load_default
214
+ script.load '~/.mspecrc'
215
+ script.options
216
+ script.signals
217
+ script.register
218
+ script.run
219
+ end
220
+ end
@@ -0,0 +1,53 @@
1
+ class SpecVersion
2
+ # If beginning implementations have a problem with this include, we can
3
+ # manually implement the relational operators that are needed.
4
+ include Comparable
5
+
6
+ # SpecVersion handles comparison correctly for the context by filling in
7
+ # missing version parts according to the value of +ceil+. If +ceil+ is
8
+ # +false+, 0 digits fill in missing version parts. If +ceil+ is +true+, 9
9
+ # digits fill in missing parts. (See e.g. VersionGuard and BugGuard.)
10
+ def initialize(version, ceil = false)
11
+ @version = version
12
+ @ceil = ceil
13
+ @integer = nil
14
+ end
15
+
16
+ def to_s
17
+ @version
18
+ end
19
+
20
+ def to_str
21
+ to_s
22
+ end
23
+
24
+ # Converts a string representation of a version major.minor.tiny.patchlevel
25
+ # to an integer representation so that comparisons can be made. For example,
26
+ # "1.8.6.77" < "1.8.6.123" would be false if compared as strings.
27
+ def to_i
28
+ unless @integer
29
+ major, minor, tiny, patch = @version.split "."
30
+ if @ceil
31
+ tiny = 99 unless tiny
32
+ patch = 9999 unless patch
33
+ end
34
+ parts = [major, minor, tiny, patch].map { |x| x.to_i }
35
+ @integer = ("1%02d%02d%02d%04d" % parts).to_i
36
+ end
37
+ @integer
38
+ end
39
+
40
+ def to_int
41
+ to_i
42
+ end
43
+
44
+ def <=>(other)
45
+ if other.respond_to? :to_int
46
+ other = Integer other
47
+ else
48
+ other = SpecVersion.new(String(other)).to_i
49
+ end
50
+
51
+ self.to_i <=> other
52
+ end
53
+ end
@@ -0,0 +1,5 @@
1
+ require 'mspec/utils/version'
2
+
3
+ module MSpec
4
+ VERSION = SpecVersion.new "1.5.10"
5
+ end
@@ -0,0 +1,2 @@
1
+ client_id|last_sync_success
2
+ 67320d31-e42e-4156-af91-5d9bd7175b08|
@@ -0,0 +1,90 @@
1
+ id|source_id|attrib|object|value|update_type|attrib_type
2
+ -968154026|2|status|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|New|query|
3
+ -938351811|2|assigned_user_id|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|d64e9409-6445-db6f-e9eb-48fce5e9fb16|query|
4
+ -755246940|2|created_by_name|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|adam|query|
5
+ -660742819|2|work_log|41a4e1f1-2c0c-7e51-0495-4900dc4c072c||query|
6
+ -522353477|2|priority|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|High|query|
7
+ -201194833|2|case_number|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|58|query|
8
+ 73844238|2|account_id|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|881be9cb-3879-9660-46be-48fceb82ea5f|query|
9
+ 131027507|2|type|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|Administration|query|
10
+ 192450540|2|modified_user_id|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|820ea7b3-d38a-2700-2ed9-4941aa91d86e|query|
11
+ 361853782|2|name|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|implement SugarCRM sample app|query|
12
+ 391423897|2|assigned_user_name|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|adam|query|
13
+ 404395255|2|modified_by_name|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|testuser|query|
14
+ 512092784|2|description|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|\t\t\n\tupdated|query|
15
+ 621474714|2|date_modified|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|2008-12-12 02:25:31|query|
16
+ 691423225|2|date_entered|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|2008-10-23 20:21:27|query|
17
+ 769279701|2|resolution|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|\t\t\n\t|query|
18
+ 830631028|2|created_by|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|d64e9409-6445-db6f-e9eb-48fce5e9fb16|query|
19
+ 838875565|2|account_name|41a4e1f1-2c0c-7e51-0495-4900dc4c072c|Rhomobile|query|
20
+ -1055571588|1|billing_address_country|44e804f2-4933-4e20-271c-48fcecd9450d|India|query|
21
+ -1016564775|1|assigned_user_id|44e804f2-4933-4e20-271c-48fcecd9450d|1|query|
22
+ -993389503|1|website|44e804f2-4933-4e20-271c-48fcecd9450d|mobio.in|query|
23
+ -923554450|1|billing_address_street|44e804f2-4933-4e20-271c-48fcecd9450d||query|
24
+ -850514663|1|assigned_user_name|44e804f2-4933-4e20-271c-48fcecd9450d|admin|query|
25
+ -805506460|1|created_by|44e804f2-4933-4e20-271c-48fcecd9450d|1|query|
26
+ -678852594|1|campaign_id|44e804f2-4933-4e20-271c-48fcecd9450d||query|
27
+ -648794332|1|billing_address_city|44e804f2-4933-4e20-271c-48fcecd9450d|Gurgaon|query|
28
+ -608939135|1|shipping_address_street|44e804f2-4933-4e20-271c-48fcecd9450d||query|
29
+ -605353927|1|email1|44e804f2-4933-4e20-271c-48fcecd9450d|ramneek@bhasin.com|query|
30
+ -594260079|1|date_modified|44e804f2-4933-4e20-271c-48fcecd9450d|2008-10-21 18:07:11|query|
31
+ -550140002|1|sic_code|44e804f2-4933-4e20-271c-48fcecd9450d||query|
32
+ -470464900|1|industry|44e804f2-4933-4e20-271c-48fcecd9450d|Technology|query|
33
+ -396146191|1|parent_name|44e804f2-4933-4e20-271c-48fcecd9450d||query|
34
+ -359256934|1|name|44e804f2-4933-4e20-271c-48fcecd9450d|Mobio India|query|
35
+ -332949845|1|annual_revenue|44e804f2-4933-4e20-271c-48fcecd9450d||query|
36
+ -312021027|1|ticker_symbol|44e804f2-4933-4e20-271c-48fcecd9450d||query|
37
+ -194048404|1|phone_fax|44e804f2-4933-4e20-271c-48fcecd9450d||query|
38
+ -152845069|1|shipping_address_city|44e804f2-4933-4e20-271c-48fcecd9450d||query|
39
+ -150248722|1|ownership|44e804f2-4933-4e20-271c-48fcecd9450d||query|
40
+ -45449434|1|phone_office|44e804f2-4933-4e20-271c-48fcecd9450d||query|
41
+ -8943188|1|phone_alternate|44e804f2-4933-4e20-271c-48fcecd9450d||query|
42
+ 63546948|1|billing_address_state|44e804f2-4933-4e20-271c-48fcecd9450d||query|
43
+ 114237576|1|modified_user_id|44e804f2-4933-4e20-271c-48fcecd9450d|1|query|
44
+ 220076107|1|description|44e804f2-4933-4e20-271c-48fcecd9450d||query|
45
+ 326182291|1|modified_by_name|44e804f2-4933-4e20-271c-48fcecd9450d|admin|query|
46
+ 517349454|1|employees|44e804f2-4933-4e20-271c-48fcecd9450d||query|
47
+ 596458092|1|shipping_address_postalcode|44e804f2-4933-4e20-271c-48fcecd9450d||query|
48
+ 750590418|1|billing_address_postalcode|44e804f2-4933-4e20-271c-48fcecd9450d||query|
49
+ 839788895|1|account_type|44e804f2-4933-4e20-271c-48fcecd9450d||query|
50
+ 923162830|1|date_entered|44e804f2-4933-4e20-271c-48fcecd9450d|2008-10-20 20:40:42|query|
51
+ 966039289|1|rating|44e804f2-4933-4e20-271c-48fcecd9450d||query|
52
+ 1059957377|1|parent_id|44e804f2-4933-4e20-271c-48fcecd9450d||query|
53
+ 1065948343|1|created_by_name|44e804f2-4933-4e20-271c-48fcecd9450d|admin|query|
54
+ 1072561171|1|shipping_address_state|44e804f2-4933-4e20-271c-48fcecd9450d||query|
55
+ -1036293295|1|phone_fax|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
56
+ -1015063951|1|description|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
57
+ -992493612|1|ownership|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
58
+ -991176969|1|date_modified|63cf13da-cff4-99e7-f946-48fcec93f1cc|2008-10-22 20:30:48|query|
59
+ -981671585|1|billing_address_city|63cf13da-cff4-99e7-f946-48fcec93f1cc|Mountain View|query|
60
+ -843155646|1|ticker_symbol|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
61
+ -729819866|1|shipping_address_street|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
62
+ -685629096|1|shipping_address_city|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
63
+ -663308719|1|phone_alternate|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
64
+ -596218060|1|email1|63cf13da-cff4-99e7-f946-48fcec93f1cc|dan@aeroprise.com|query|
65
+ -475252466|1|shipping_address_state|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
66
+ -469237079|1|billing_address_state|63cf13da-cff4-99e7-f946-48fcec93f1cc|CA|query|
67
+ -384341850|1|annual_revenue|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
68
+ -323884439|1|billing_address_street|63cf13da-cff4-99e7-f946-48fcec93f1cc|1032 Shoreline Drive|query|
69
+ -190677709|1|employees|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
70
+ -111196576|1|phone_office|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
71
+ -96428733|1|modified_user_id|63cf13da-cff4-99e7-f946-48fcec93f1cc|1|query|
72
+ -18701746|1|modified_by_name|63cf13da-cff4-99e7-f946-48fcec93f1cc|admin|query|
73
+ 99273267|1|campaign_id|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
74
+ 170741470|1|created_by|63cf13da-cff4-99e7-f946-48fcec93f1cc|1|query|
75
+ 217712487|1|parent_id|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
76
+ 273350594|1|shipping_address_country|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
77
+ 381979670|1|parent_name|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
78
+ 394939468|1|billing_address_postalcode|63cf13da-cff4-99e7-f946-48fcec93f1cc|94024|query|
79
+ 411582813|1|created_by_name|63cf13da-cff4-99e7-f946-48fcec93f1cc|admin|query|
80
+ 637602004|1|name|63cf13da-cff4-99e7-f946-48fcec93f1cc|Aeroprise|query|
81
+ 638774247|1|website|63cf13da-cff4-99e7-f946-48fcec93f1cc|aeroprise.com|query|
82
+ 639824025|1|account_type|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
83
+ 667425113|1|sic_code|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
84
+ 723197960|1|date_entered|63cf13da-cff4-99e7-f946-48fcec93f1cc|2008-10-20 20:39:15|query|
85
+ 747100215|1|industry|63cf13da-cff4-99e7-f946-48fcec93f1cc|Technology|query|
86
+ 786034836|1|assigned_user_id|63cf13da-cff4-99e7-f946-48fcec93f1cc|1|query|
87
+ 840957428|1|rating|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
88
+ 865596563|1|assigned_user_name|63cf13da-cff4-99e7-f946-48fcec93f1cc|admin|query|
89
+ 914826898|1|shipping_address_postalcode|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
90
+ 971031329|1|billing_address_country|63cf13da-cff4-99e7-f946-48fcec93f1cc||query|
@@ -17,17 +17,14 @@
17
17
  # You should have received a copy of the GNU General Public License
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
- $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
21
- require File.dirname(__FILE__) + "/spec_helper"
20
+ require 'spec/spec_helper'
22
21
  require 'rho/rhocontroller'
23
22
 
24
- describe "Rho" do
25
-
26
- it_should_behave_like "rho initializer"
23
+ describe "Rho::RhoController" do
27
24
 
28
25
  describe "url_for and link_to" do
29
26
 
30
- before(:each) do
27
+ before do
31
28
  @c = Rho::RhoController.new
32
29
  @c.stub!(:send).and_return(nil)
33
30
  @c.serve(nil,{'application' => 'application', 'model' => 'model'},{})
@@ -110,7 +107,7 @@ describe "Rho" do
110
107
 
111
108
  describe "redirect" do
112
109
 
113
- before(:each) do
110
+ before do
114
111
  @response = Hash.new
115
112
  @response['headers'] = {}
116
113
  @c = Rho::RhoController.new
@@ -17,59 +17,38 @@
17
17
  # You should have received a copy of the GNU General Public License
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
- $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
21
- require File.dirname(__FILE__) + "/spec_helper"
20
+ require 'spec/spec_helper'
22
21
 
23
22
  describe "Rho" do
24
23
 
25
- it_should_behave_like "rho initializer"
26
- it_should_behave_like "rho db initializer"
27
-
24
+ before(:each) do
25
+ Rho::RhoConfig.config = {'start_path'=>'/app','options_path'=>'/app/Settings'}
26
+ end
27
+
28
28
  it "should populate configuration in sources table" do
29
29
  sources = Rhom::RhomDbAdapter::select_from_table('sources','*')
30
30
  sources.size.should > 1
31
31
  end
32
-
33
- it "should initialize configuration only once" do
34
- Rhom::RhomDbAdapter::delete_all_from_table('sources')
35
- @rho.source_initialized?(1).should == false
36
- @rho.init_sources
37
- @rho.source_initialized?(1).should == true
38
- end
39
-
32
+
40
33
  it "should have start_path" do
41
- Rho::RhoConfig.start_path.should == '/'
34
+ Rho::RhoConfig.start_path.should == '/app'
42
35
  end
43
-
36
+
37
+ it "should retrieve start_path" do
38
+ Rho::RhoConfig.start_path.should == '/app'
39
+ end
40
+
44
41
  it "should set start_path" do
45
- Rho::RhoConfig.start_path = '/foo/bar'
42
+ Rho::RhoConfig.config['start_path'] = '/foo/bar'
46
43
  Rho::RhoConfig.start_path.should == '/foo/bar'
47
44
  end
48
-
49
- it "should retrieve start_path" do
50
- Rho::RhoConfig.start_path = '/'
51
- @rho.get_start_path.should == '/'
52
- end
53
45
 
54
46
  it "should have options_path" do
55
- Rho::RhoConfig.options_path.should == '/'
47
+ Rho::RhoConfig.options_path.should == '/app/Settings'
56
48
  end
57
49
 
58
50
  it "should set options_path" do
59
- Rho::RhoConfig.options_path = '/ops2'
51
+ Rho::RhoConfig.config['options_path'] = '/ops2'
60
52
  Rho::RhoConfig.options_path.should == '/ops2'
61
53
  end
62
-
63
- it "should retrieve options_path" do
64
- Rho::RhoConfig.options_path = '/ops3'
65
- @rho.get_options_path.should == '/ops3'
66
- end
67
-
68
- it "should return from get_app" do
69
- pending "fix relative paths for testing of get_app"
70
- end
71
-
72
- it "should serve request" do
73
- pending "need to mock request"
74
- end
75
54
  end