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.
- data/Manifest.txt +159 -30
- data/Rakefile +3 -19
- data/lib/erb.rb +1 -1
- data/lib/rho/rho.rb +94 -107
- data/lib/rho/rhofsconnector.rb +4 -0
- data/lib/rho/rhoutils.rb +26 -0
- data/lib/rho/rhoviewhelpers.rb +1 -1
- data/lib/rhodes.rb +2 -2
- data/lib/rhoframework.rb +9 -9
- data/lib/rhom/rhom.rb +1 -1
- data/lib/rhom/rhom_db_adapter.rb +36 -15
- data/lib/rhom/rhom_db_adapterME.rb +2 -3
- data/lib/rhom/rhom_object.rb +14 -2
- data/lib/rhom/rhom_object_factory.rb +42 -11
- data/lib/version.rb +2 -2
- data/spec/README +1 -0
- data/spec/Rakefile +1 -0
- data/spec/{configs/account.rb → app/Account/config.rb} +0 -0
- data/spec/{configs/case.rb → app/Case/config.rb} +0 -0
- data/spec/app/Question/config.rb +3 -0
- data/spec/app/Settings/controller.rb +10 -0
- data/spec/app/Settings/index.erb +11 -0
- data/spec/app/SpecRunner/controller.rb +15 -0
- data/spec/app/SpecRunner/index.erb +14 -0
- data/spec/app/application.rb +4 -0
- data/spec/app/index.erb +17 -0
- data/spec/app/layout.erb +27 -0
- data/spec/app/loading.html +11 -0
- data/spec/app/mspec.rb +11 -0
- data/spec/app/mspec/expectations.rb +2 -0
- data/spec/app/mspec/expectations/expectations.rb +17 -0
- data/spec/app/mspec/expectations/should.rb +25 -0
- data/spec/app/mspec/fileutils.rb +1590 -0
- data/spec/app/mspec/guards.rb +16 -0
- data/spec/app/mspec/guards/background.rb +21 -0
- data/spec/app/mspec/guards/bug.rb +24 -0
- data/spec/app/mspec/guards/compliance.rb +37 -0
- data/spec/app/mspec/guards/conflict.rb +18 -0
- data/spec/app/mspec/guards/endian.rb +44 -0
- data/spec/app/mspec/guards/extensions.rb +20 -0
- data/spec/app/mspec/guards/guard.rb +166 -0
- data/spec/app/mspec/guards/noncompliance.rb +20 -0
- data/spec/app/mspec/guards/platform.rb +43 -0
- data/spec/app/mspec/guards/quarantine.rb +17 -0
- data/spec/app/mspec/guards/runner.rb +34 -0
- data/spec/app/mspec/guards/superuser.rb +17 -0
- data/spec/app/mspec/guards/support.rb +20 -0
- data/spec/app/mspec/guards/tty.rb +20 -0
- data/spec/app/mspec/guards/version.rb +38 -0
- data/spec/app/mspec/helpers.rb +11 -0
- data/spec/app/mspec/helpers/argv.rb +43 -0
- data/spec/app/mspec/helpers/bignum.rb +5 -0
- data/spec/app/mspec/helpers/const_lookup.rb +9 -0
- data/spec/app/mspec/helpers/environment.rb +23 -0
- data/spec/app/mspec/helpers/fixture.rb +20 -0
- data/spec/app/mspec/helpers/flunk.rb +5 -0
- data/spec/app/mspec/helpers/io.rb +17 -0
- data/spec/app/mspec/helpers/language_version.rb +20 -0
- data/spec/app/mspec/helpers/ruby_exe.rb +123 -0
- data/spec/app/mspec/helpers/scratch.rb +17 -0
- data/spec/app/mspec/helpers/tmp.rb +32 -0
- data/spec/app/mspec/matchers.rb +23 -0
- data/spec/app/mspec/matchers/base.rb +95 -0
- data/spec/app/mspec/matchers/be_an_instance_of.rb +26 -0
- data/spec/app/mspec/matchers/be_ancestor_of.rb +24 -0
- data/spec/app/mspec/matchers/be_close.rb +27 -0
- data/spec/app/mspec/matchers/be_empty.rb +20 -0
- data/spec/app/mspec/matchers/be_false.rb +20 -0
- data/spec/app/mspec/matchers/be_kind_of.rb +24 -0
- data/spec/app/mspec/matchers/be_nil.rb +20 -0
- data/spec/app/mspec/matchers/be_true.rb +20 -0
- data/spec/app/mspec/matchers/complain.rb +56 -0
- data/spec/app/mspec/matchers/eql.rb +26 -0
- data/spec/app/mspec/matchers/equal.rb +26 -0
- data/spec/app/mspec/matchers/equal_element.rb +78 -0
- data/spec/app/mspec/matchers/equal_utf16.rb +34 -0
- data/spec/app/mspec/matchers/have_constant.rb +30 -0
- data/spec/app/mspec/matchers/have_instance_method.rb +24 -0
- data/spec/app/mspec/matchers/have_method.rb +24 -0
- data/spec/app/mspec/matchers/have_private_instance_method.rb +24 -0
- data/spec/app/mspec/matchers/include.rb +32 -0
- data/spec/app/mspec/matchers/match_yaml.rb +47 -0
- data/spec/app/mspec/matchers/method.rb +14 -0
- data/spec/app/mspec/matchers/output.rb +67 -0
- data/spec/app/mspec/matchers/output_to_fd.rb +71 -0
- data/spec/app/mspec/matchers/raise_error.rb +48 -0
- data/spec/app/mspec/matchers/respond_to.rb +24 -0
- data/spec/app/mspec/matchers/stringsymboladapter.rb +8 -0
- data/spec/app/mspec/mocks.rb +3 -0
- data/spec/app/mspec/mocks/mock.rb +159 -0
- data/spec/app/mspec/mocks/object.rb +20 -0
- data/spec/app/mspec/mocks/proxy.rb +136 -0
- data/spec/app/mspec/pp.rb +893 -0
- data/spec/app/mspec/runner.rb +15 -0
- data/spec/app/mspec/runner/actions.rb +8 -0
- data/spec/app/mspec/runner/actions/debug.rb +17 -0
- data/spec/app/mspec/runner/actions/filter.rb +40 -0
- data/spec/app/mspec/runner/actions/gdb.rb +17 -0
- data/spec/app/mspec/runner/actions/tag.rb +133 -0
- data/spec/app/mspec/runner/actions/taglist.rb +56 -0
- data/spec/app/mspec/runner/actions/tagpurge.rb +56 -0
- data/spec/app/mspec/runner/actions/tally.rb +116 -0
- data/spec/app/mspec/runner/actions/timer.rb +22 -0
- data/spec/app/mspec/runner/context.rb +188 -0
- data/spec/app/mspec/runner/example.rb +34 -0
- data/spec/app/mspec/runner/exception.rb +43 -0
- data/spec/app/mspec/runner/filters.rb +4 -0
- data/spec/app/mspec/runner/filters/match.rb +22 -0
- data/spec/app/mspec/runner/filters/profile.rb +54 -0
- data/spec/app/mspec/runner/filters/regexp.rb +7 -0
- data/spec/app/mspec/runner/filters/tag.rb +29 -0
- data/spec/app/mspec/runner/formatters.rb +10 -0
- data/spec/app/mspec/runner/formatters/describe.rb +24 -0
- data/spec/app/mspec/runner/formatters/dotted.rb +98 -0
- data/spec/app/mspec/runner/formatters/file.rb +19 -0
- data/spec/app/mspec/runner/formatters/html.rb +81 -0
- data/spec/app/mspec/runner/formatters/method.rb +93 -0
- data/spec/app/mspec/runner/formatters/specdoc.rb +41 -0
- data/spec/app/mspec/runner/formatters/spinner.rb +99 -0
- data/spec/app/mspec/runner/formatters/summary.rb +11 -0
- data/spec/app/mspec/runner/formatters/unit.rb +21 -0
- data/spec/app/mspec/runner/formatters/yaml.rb +44 -0
- data/spec/app/mspec/runner/mspec.rb +361 -0
- data/spec/app/mspec/runner/object.rb +24 -0
- data/spec/app/mspec/runner/shared.rb +12 -0
- data/spec/app/mspec/runner/tag.rb +32 -0
- data/spec/app/mspec/utils/name_map.rb +129 -0
- data/spec/app/mspec/utils/options.rb +441 -0
- data/spec/app/mspec/utils/ruby_name.rb +8 -0
- data/spec/app/mspec/utils/script.rb +220 -0
- data/spec/app/mspec/utils/version.rb +53 -0
- data/spec/app/mspec/version.rb +5 -0
- data/spec/app/spec/fixtures/client_info.txt +2 -0
- data/spec/app/spec/fixtures/object_values.txt +90 -0
- data/spec/{rho_controller_spec.rb → app/spec/rho_controller_spec.rb} +4 -7
- data/spec/{rho_spec.rb → app/spec/rho_spec.rb} +15 -36
- data/spec/{rhom_object_factory_spec.rb → app/spec/rhom_object_factory_spec.rb} +108 -72
- data/spec/{rhom_spec.rb → app/spec/rhom_spec.rb} +8 -4
- data/spec/app/spec/spec_helper.rb +15 -0
- data/spec/app/spec/webview_spec.rb +27 -0
- data/spec/app/spec_runner.rb +26 -0
- data/spec/build.yml +28 -0
- data/spec/public/css/base.css +39 -0
- data/spec/public/css/blackberry.css +99 -0
- data/spec/public/css/iphone.css +392 -0
- data/spec/public/css/rho.css +3 -0
- data/spec/public/css/xhtml.css +114 -0
- data/spec/public/images/IUI_LICENSE.txt +21 -0
- data/spec/public/images/backButton.png +0 -0
- data/spec/public/images/blueButton.png +0 -0
- data/spec/public/images/cancel.png +0 -0
- data/spec/public/images/grayButton.png +0 -0
- data/spec/public/images/iui-logo-touch-icon.png +0 -0
- data/spec/public/images/listArrow.png +0 -0
- data/spec/public/images/listArrowSel.png +0 -0
- data/spec/public/images/listGroup.png +0 -0
- data/spec/public/images/loading.gif +0 -0
- data/spec/public/images/pinstripes.png +0 -0
- data/spec/public/images/right_button.png +0 -0
- data/spec/public/images/selection.png +0 -0
- data/spec/public/images/thumb.png +0 -0
- data/spec/public/images/toggle.png +0 -0
- data/spec/public/images/toggleOn.png +0 -0
- data/spec/public/images/toolButton.png +0 -0
- data/spec/public/images/toolButton_new.png +0 -0
- data/spec/public/images/toolbar.png +0 -0
- data/spec/public/images/whiteButton.png +0 -0
- data/spec/public/js/application.js +1 -0
- data/spec/public/js/jquery-1.2.6.min.js +32 -0
- data/spec/public/js/rho.js +4 -0
- data/spec/public/js/rhogeolocation-wm.js +59 -0
- data/spec/public/js/rhogeolocation.js +11 -0
- data/spec/rhoconfig.txt +19 -0
- metadata +169 -39
- data/History.txt +0 -37
- data/README.rdoc +0 -2
- data/lib/TestServe.rb +0 -9
- data/res/sqlite3/constants.rb +0 -49
- data/res/sqlite3/database.rb +0 -715
- data/res/sqlite3/driver/dl/api.rb +0 -154
- data/res/sqlite3/driver/dl/driver.rb +0 -307
- data/res/sqlite3/driver/native/driver.rb +0 -257
- data/res/sqlite3/errors.rb +0 -68
- data/res/sqlite3/pragmas.rb +0 -271
- data/res/sqlite3/resultset.rb +0 -176
- data/res/sqlite3/sqlite3_api.rb +0 -0
- data/res/sqlite3/statement.rb +0 -230
- data/res/sqlite3/translator.rb +0 -109
- data/res/sqlite3/value.rb +0 -57
- data/res/sqlite3/version.rb +0 -14
- data/rhodes.gemspec +0 -18
- data/spec/app_manifest.txt +0 -4
- data/spec/configs/contact.rb +0 -3
- data/spec/configs/employee.rb +0 -3
- data/spec/spec.opts +0 -1
- data/spec/spec_helper.rb +0 -49
- data/spec/stubs.rb +0 -39
- data/spec/syncdbtest.sqlite +0 -0
data/res/sqlite3/value.rb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'sqlite3/constants'
|
2
|
-
|
3
|
-
module SQLite3
|
4
|
-
|
5
|
-
class Value
|
6
|
-
attr_reader :handle
|
7
|
-
|
8
|
-
def initialize( db, handle )
|
9
|
-
@driver = db.driver
|
10
|
-
@handle = handle
|
11
|
-
end
|
12
|
-
|
13
|
-
def null?
|
14
|
-
type == :null
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_blob
|
18
|
-
@driver.value_blob( @handle )
|
19
|
-
end
|
20
|
-
|
21
|
-
def length( utf16=false )
|
22
|
-
if utf16
|
23
|
-
@driver.value_bytes16( @handle )
|
24
|
-
else
|
25
|
-
@driver.value_bytes( @handle )
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def to_f
|
30
|
-
@driver.value_double( @handle )
|
31
|
-
end
|
32
|
-
|
33
|
-
def to_i
|
34
|
-
@driver.value_int( @handle )
|
35
|
-
end
|
36
|
-
|
37
|
-
def to_int64
|
38
|
-
@driver.value_int64( @handle )
|
39
|
-
end
|
40
|
-
|
41
|
-
def to_s( utf16=false )
|
42
|
-
@driver.value_text( @handle, utf16 )
|
43
|
-
end
|
44
|
-
|
45
|
-
def type
|
46
|
-
case @driver.value_type( @handle )
|
47
|
-
when Constants::ColumnType::INTEGER then :int
|
48
|
-
when Constants::ColumnType::FLOAT then :float
|
49
|
-
when Constants::ColumnType::TEXT then :text
|
50
|
-
when Constants::ColumnType::BLOB then :blob
|
51
|
-
when Constants::ColumnType::NULL then :null
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
data/res/sqlite3/version.rb
DELETED
data/rhodes.gemspec
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = %q{rhodes}
|
3
|
-
s.version = Rhodes::VERSION
|
4
|
-
|
5
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
|
-
s.authors = ["Rhomobile dev"]
|
7
|
-
s.date = %q{2008-10-24}
|
8
|
-
s.description = %q{The Rhodes application framework allows developers to create native mobile applications with the brevity, productivity and power of the Ruby programming language.}
|
9
|
-
s.email = ["dev@rhomobile.com"]
|
10
|
-
s.executables = []
|
11
|
-
s.files = FileList['lib/**/*.rb', '[A-Z]*', 'spec/**/*'].to_a
|
12
|
-
s.has_rdoc = true
|
13
|
-
s.homepage = %q{http://www.rhomobile.com/}
|
14
|
-
s.rdoc_options = ["--main", "../../README.rdoc", "--line-numbers"]
|
15
|
-
s.rubyforge_project = %q{rhodes}
|
16
|
-
s.rubygems_version = "#{Rhodes::VERSION}"
|
17
|
-
s.summary = "rhodes #{Rhodes::VERSION}"
|
18
|
-
end
|
data/spec/app_manifest.txt
DELETED
data/spec/configs/contact.rb
DELETED
data/spec/configs/employee.rb
DELETED
data/spec/spec.opts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--colour
|
data/spec/spec_helper.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'spec'
|
3
|
-
rescue LoadError
|
4
|
-
require 'rubygems'
|
5
|
-
gem 'rspec'
|
6
|
-
require 'spec'
|
7
|
-
end
|
8
|
-
|
9
|
-
$:.unshift(File.join(File.dirname(__FILE__), '..'))
|
10
|
-
|
11
|
-
# Use the rubygem for local testing
|
12
|
-
require 'spec/stubs'
|
13
|
-
require 'rho/rho'
|
14
|
-
require 'rhom/rhom'
|
15
|
-
|
16
|
-
describe "rho initializer", :shared => true do
|
17
|
-
|
18
|
-
attr_accessor :rhom, :rho
|
19
|
-
|
20
|
-
before(:all) do
|
21
|
-
FileUtils.mkdir_p('build')
|
22
|
-
end
|
23
|
-
|
24
|
-
after(:all) do
|
25
|
-
FileUtils.rm_rf('build')
|
26
|
-
end
|
27
|
-
|
28
|
-
def array_print(arr)
|
29
|
-
arr.each_with_index do |x,i|
|
30
|
-
puts "arr[#{i}] = #{x.inspect}"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
describe "rho db initializer", :shared => true do
|
36
|
-
before(:each) do
|
37
|
-
FileUtils.rm_rf('build/syncdbtest.sqlite')
|
38
|
-
FileUtils.cp_r('spec/syncdbtest.sqlite','build/syncdbtest.sqlite')
|
39
|
-
Object::const_set("SYNC_DB_FILE", "build/syncdbtest.sqlite") unless defined? SYNC_DB_FILE
|
40
|
-
@rho = Rho::RHO.new(File.join(File.dirname(File.expand_path(__FILE__)), 'app_manifest.txt'))
|
41
|
-
@rhom = Rhom::RhomObjectFactory.new
|
42
|
-
end
|
43
|
-
|
44
|
-
after(:each) do
|
45
|
-
Rhom::RhomDbAdapter.close
|
46
|
-
@rho = nil
|
47
|
-
@rhom = nil
|
48
|
-
end
|
49
|
-
end
|
data/spec/stubs.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# Stubs for testing
|
2
|
-
class Fixnum
|
3
|
-
def fdiv
|
4
|
-
end
|
5
|
-
end
|
6
|
-
class Bignum
|
7
|
-
def fdiv
|
8
|
-
end
|
9
|
-
end
|
10
|
-
class String
|
11
|
-
# stub this until we run on 1.9
|
12
|
-
def force_encoding(str)
|
13
|
-
self
|
14
|
-
end
|
15
|
-
end
|
16
|
-
class SyncEngine
|
17
|
-
def self.dosync
|
18
|
-
end
|
19
|
-
def self.lock_sync_mutex
|
20
|
-
end
|
21
|
-
def self.unlock_sync_mutex
|
22
|
-
end
|
23
|
-
def self.login
|
24
|
-
1
|
25
|
-
end
|
26
|
-
def self.logout
|
27
|
-
end
|
28
|
-
def self.logged_in
|
29
|
-
1
|
30
|
-
end
|
31
|
-
end
|
32
|
-
class StringScanner
|
33
|
-
end
|
34
|
-
require 'rho'
|
35
|
-
class << Rho::RhoFSConnector
|
36
|
-
def __rhoGetCurrentDir
|
37
|
-
"../../../apps/"
|
38
|
-
end
|
39
|
-
end
|
data/spec/syncdbtest.sqlite
DELETED
Binary file
|