thesis 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +103 -68
  3. data/app/assets/javascripts/thesis.js +1 -0
  4. data/app/assets/javascripts/thesis/thesis.coffee +250 -0
  5. data/app/assets/javascripts/thesis/utilities.coffee +13 -0
  6. data/app/assets/stylesheets/thesis.sass +4 -0
  7. data/app/assets/stylesheets/thesis/_mixins/_barber-pole.sass +5 -0
  8. data/app/assets/stylesheets/thesis/_mixins/editor.sass +15 -0
  9. data/app/assets/stylesheets/thesis/_thesis.sass +207 -0
  10. data/app/assets/stylesheets/thesis/base/_base.sass +5 -0
  11. data/app/assets/stylesheets/thesis/base/_colors.sass +6 -0
  12. data/app/assets/stylesheets/thesis/base/_fonts.sass +6 -0
  13. data/app/assets/stylesheets/thesis/base/_forms.scss +165 -0
  14. data/app/assets/stylesheets/thesis/base/_keyframes.sass +205 -0
  15. data/app/assets/stylesheets/thesis/base/bourbon/_bourbon-deprecated-upcoming.scss +8 -0
  16. data/app/assets/stylesheets/thesis/base/bourbon/_bourbon.scss +79 -0
  17. data/app/assets/stylesheets/thesis/base/bourbon/addons/_button.scss +374 -0
  18. data/app/assets/stylesheets/thesis/base/bourbon/addons/_clearfix.scss +23 -0
  19. data/app/assets/stylesheets/thesis/base/bourbon/addons/_directional-values.scss +111 -0
  20. data/app/assets/stylesheets/thesis/base/bourbon/addons/_ellipsis.scss +7 -0
  21. data/app/assets/stylesheets/thesis/base/bourbon/addons/_font-family.scss +5 -0
  22. data/app/assets/stylesheets/thesis/base/bourbon/addons/_hide-text.scss +10 -0
  23. data/app/assets/stylesheets/thesis/base/bourbon/addons/_html5-input-types.scss +86 -0
  24. data/app/assets/stylesheets/thesis/base/bourbon/addons/_position.scss +32 -0
  25. data/app/assets/stylesheets/thesis/base/bourbon/addons/_prefixer.scss +45 -0
  26. data/app/assets/stylesheets/thesis/base/bourbon/addons/_retina-image.scss +31 -0
  27. data/app/assets/stylesheets/thesis/base/bourbon/addons/_size.scss +16 -0
  28. data/app/assets/stylesheets/thesis/base/bourbon/addons/_timing-functions.scss +32 -0
  29. data/app/assets/stylesheets/thesis/base/bourbon/addons/_triangle.scss +83 -0
  30. data/app/assets/stylesheets/thesis/base/bourbon/addons/_word-wrap.scss +8 -0
  31. data/app/assets/stylesheets/thesis/base/bourbon/css3/_animation.scss +52 -0
  32. data/app/assets/stylesheets/thesis/base/bourbon/css3/_appearance.scss +3 -0
  33. data/app/assets/stylesheets/thesis/base/bourbon/css3/_backface-visibility.scss +6 -0
  34. data/app/assets/stylesheets/thesis/base/bourbon/css3/_background-image.scss +42 -0
  35. data/app/assets/stylesheets/thesis/base/bourbon/css3/_background.scss +55 -0
  36. data/app/assets/stylesheets/thesis/base/bourbon/css3/_border-image.scss +59 -0
  37. data/app/assets/stylesheets/thesis/base/bourbon/css3/_border-radius.scss +22 -0
  38. data/app/assets/stylesheets/thesis/base/bourbon/css3/_box-sizing.scss +4 -0
  39. data/app/assets/stylesheets/thesis/base/bourbon/css3/_calc.scss +4 -0
  40. data/app/assets/stylesheets/thesis/base/bourbon/css3/_columns.scss +47 -0
  41. data/app/assets/stylesheets/thesis/base/bourbon/css3/_filter.scss +5 -0
  42. data/app/assets/stylesheets/thesis/base/bourbon/css3/_flex-box.scss +321 -0
  43. data/app/assets/stylesheets/thesis/base/bourbon/css3/_font-face.scss +23 -0
  44. data/app/assets/stylesheets/thesis/base/bourbon/css3/_font-feature-settings.scss +10 -0
  45. data/app/assets/stylesheets/thesis/base/bourbon/css3/_hidpi-media-query.scss +10 -0
  46. data/app/assets/stylesheets/thesis/base/bourbon/css3/_hyphens.scss +4 -0
  47. data/app/assets/stylesheets/thesis/base/bourbon/css3/_image-rendering.scss +14 -0
  48. data/app/assets/stylesheets/thesis/base/bourbon/css3/_keyframes.scss +35 -0
  49. data/app/assets/stylesheets/thesis/base/bourbon/css3/_linear-gradient.scss +38 -0
  50. data/app/assets/stylesheets/thesis/base/bourbon/css3/_perspective.scss +8 -0
  51. data/app/assets/stylesheets/thesis/base/bourbon/css3/_placeholder.scss +8 -0
  52. data/app/assets/stylesheets/thesis/base/bourbon/css3/_radial-gradient.scss +39 -0
  53. data/app/assets/stylesheets/thesis/base/bourbon/css3/_transform.scss +15 -0
  54. data/app/assets/stylesheets/thesis/base/bourbon/css3/_transition.scss +77 -0
  55. data/app/assets/stylesheets/thesis/base/bourbon/css3/_user-select.scss +3 -0
  56. data/app/assets/stylesheets/thesis/base/bourbon/functions/_assign.scss +11 -0
  57. data/app/assets/stylesheets/thesis/base/bourbon/functions/_color-lightness.scss +13 -0
  58. data/app/assets/stylesheets/thesis/base/bourbon/functions/_flex-grid.scss +39 -0
  59. data/app/assets/stylesheets/thesis/base/bourbon/functions/_golden-ratio.scss +3 -0
  60. data/app/assets/stylesheets/thesis/base/bourbon/functions/_grid-width.scss +13 -0
  61. data/app/assets/stylesheets/thesis/base/bourbon/functions/_modular-scale.scss +66 -0
  62. data/app/assets/stylesheets/thesis/base/bourbon/functions/_px-to-em.scss +13 -0
  63. data/app/assets/stylesheets/thesis/base/bourbon/functions/_px-to-rem.scss +15 -0
  64. data/app/assets/stylesheets/thesis/base/bourbon/functions/_strip-units.scss +5 -0
  65. data/app/assets/stylesheets/thesis/base/bourbon/functions/_tint-shade.scss +9 -0
  66. data/app/assets/stylesheets/thesis/base/bourbon/functions/_transition-property-name.scss +22 -0
  67. data/app/assets/stylesheets/thesis/base/bourbon/functions/_unpack.scss +17 -0
  68. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_convert-units.scss +15 -0
  69. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  70. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_is-num.scss +8 -0
  71. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-angle-parser.scss +25 -0
  72. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-gradient-parser.scss +41 -0
  73. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-positions-parser.scss +61 -0
  74. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
  75. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-arg-parser.scss +69 -0
  76. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-gradient-parser.scss +50 -0
  77. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-positions-parser.scss +18 -0
  78. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_render-gradients.scss +26 -0
  79. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_shape-size-stripper.scss +10 -0
  80. data/app/assets/stylesheets/thesis/base/bourbon/helpers/_str-to-num.scss +50 -0
  81. data/app/assets/stylesheets/thesis/base/bourbon/settings/_asset-pipeline.scss +1 -0
  82. data/app/assets/stylesheets/thesis/base/bourbon/settings/_prefixer.scss +6 -0
  83. data/app/assets/stylesheets/thesis/base/bourbon/settings/_px-to-em.scss +1 -0
  84. data/lib/generators/thesis/install/install_generator.rb +21 -13
  85. data/lib/thesis/controllers/controller_helpers.rb +11 -5
  86. data/lib/thesis/controllers/thesis_controller.rb +16 -13
  87. data/lib/thesis/models/page.rb +29 -22
  88. data/lib/thesis/models/page_content.rb +44 -29
  89. data/lib/thesis/routing/route_constraint.rb +8 -2
  90. data/lib/thesis/routing/routes.rb +2 -3
  91. data/lib/thesis/version.rb +1 -1
  92. data/spec/factories/pages.rb +1 -1
  93. data/spec/spec_helper.rb +2 -2
  94. data/spec/{lib/thesis → thesis}/controllers/thesis_controller_spec.rb +15 -13
  95. data/spec/{lib/thesis → thesis}/models/page_content_spec.rb +4 -4
  96. data/spec/{lib/thesis → thesis}/models/page_spec.rb +0 -0
  97. data/spec/thesis/routing/thesis_routing_spec.rb +23 -0
  98. metadata +137 -56
  99. data/app/assets/javascripts/thesis/thesis.js.coffee +0 -157
  100. data/app/assets/stylesheets/thesis.css +0 -4
  101. data/app/assets/stylesheets/thesis/font-awesome/font-awesome.scss +0 -534
  102. data/app/assets/stylesheets/thesis/font/FontAwesome.otf +0 -0
  103. data/app/assets/stylesheets/thesis/font/fontawesome-webfont.eot +0 -0
  104. data/app/assets/stylesheets/thesis/font/fontawesome-webfont.svg +0 -284
  105. data/app/assets/stylesheets/thesis/font/fontawesome-webfont.ttf +0 -0
  106. data/app/assets/stylesheets/thesis/font/fontawesome-webfont.woff +0 -0
  107. data/app/assets/stylesheets/thesis/jquery-ui/images/animated-overlay.gif +0 -0
  108. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
  109. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  110. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_20_555555_1x400.png +0 -0
  111. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_40_0078a3_1x400.png +0 -0
  112. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  113. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  114. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  115. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_inset-soft_25_000000_1x100.png +0 -0
  116. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
  117. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  118. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_4b8e0b_256x240.png +0 -0
  119. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_a83300_256x240.png +0 -0
  120. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_cccccc_256x240.png +0 -0
  121. data/app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
  122. data/app/assets/stylesheets/thesis/jquery-ui/jquery-ui-1.10.2.custom.css +0 -1175
  123. data/app/assets/stylesheets/thesis/thesis.css.scss +0 -65
@@ -5,8 +5,7 @@ module ActionDispatch::Routing
5
5
  post "thesis/create_page" => "thesis/thesis#create_page"
6
6
  delete "thesis/delete_page" => "thesis/thesis#delete_page"
7
7
 
8
- get "*slug" => 'thesis/thesis#show', constraints: ::Thesis::RouteConstraint
8
+ get "*slug" => 'thesis/thesis#show', constraints: ::Thesis::RouteConstraint.new
9
9
  end
10
10
  end
11
- end
12
-
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Thesis
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  FactoryGirl.define do
2
2
  factory :page, class: Thesis::Page do
3
3
  name "Some Page"
4
- slug "some-page"
4
+ slug "/some-page"
5
5
  title "An Awesome Page"
6
6
  description "A description goes here"
7
7
  template "default"
@@ -33,7 +33,7 @@ ActiveRecord::Base.establish_connection(
33
33
  # Configure ActiveRecord Testing Schema
34
34
  ActiveRecord::Schema.define do
35
35
  self.verbose = false
36
-
36
+
37
37
  create_table :pages do |t|
38
38
  t.integer :parent_id
39
39
  t.string :name
@@ -61,7 +61,7 @@ RSpec.configure do |config|
61
61
 
62
62
  DatabaseCleaner.strategy = :transaction
63
63
 
64
- # Configure DatabaseCleaner to set up a new
64
+ # Configure DatabaseCleaner to set up a new
65
65
  # transaction at the beginning of each test.
66
66
  config.before do
67
67
  DatabaseCleaner.start
@@ -1,9 +1,9 @@
1
1
  require "spec_helper"
2
2
 
3
- describe Thesis::ThesisController do
3
+ describe Thesis::ThesisController, type: :controller do
4
4
  let(:page) { create :page, template: "default" }
5
5
  let(:page_content) { create :page_content, name: "Main", page: page }
6
-
6
+
7
7
  before do
8
8
  described_class.any_instance.stub(:render).and_return(page.title)
9
9
  described_class.any_instance.stub(:template_exists?).and_return(true)
@@ -13,11 +13,7 @@ describe Thesis::ThesisController do
13
13
  describe "#show" do
14
14
  it "displays a page when it can be found" do
15
15
  make_request :show, path: page.slug
16
- @response.should_not be_nil
17
- end
18
-
19
- it "raises RoutingError when the page slug can't be found" do
20
- expect { make_request :show, path: "/nonexistent" }.to raise_error ActionController::RoutingError
16
+ expect(response).to_not be_nil
21
17
  end
22
18
 
23
19
  it "raises PageRequiresTemplate when template can't be found" do
@@ -40,7 +36,7 @@ describe Thesis::ThesisController do
40
36
 
41
37
  it "returns a status of 403 'Forbidden'" do
42
38
  make_request :create_page, name: "New Page"
43
- expect(@response.status).to eq 403
39
+ expect(@response.status).to eq 403
44
40
  end
45
41
  end
46
42
  end
@@ -49,6 +45,7 @@ describe Thesis::ThesisController do
49
45
  context "when the page can be edited" do
50
46
  it "updates the attributes of the page" do
51
47
  make_request :update_page, path: page.slug, name: "New Name"
48
+ expect(response.status).to eq 200
52
49
  page.reload
53
50
  expect(page.name).to eq "New Name"
54
51
  expect(page.slug).to eq "/new-name"
@@ -57,7 +54,7 @@ describe Thesis::ThesisController do
57
54
  end
58
55
 
59
56
  describe "#update_page_content" do
60
- context "when the page can be edited" do
57
+ context "when the page can be edited" do
61
58
  it "updates the content on the page" do
62
59
  page_content.content = "I'm the content"
63
60
  page_content.save
@@ -67,8 +64,8 @@ describe Thesis::ThesisController do
67
64
  expect(page_content.reload.content).to eq "New content"
68
65
  end
69
66
  end
70
-
71
- context "when the page can't be edited" do
67
+
68
+ context "when the page can't be edited" do
72
69
  before { described_class.any_instance.stub(:page_is_editable?).and_return(false) }
73
70
 
74
71
  it "doesn't update the page_content" do
@@ -89,8 +86,13 @@ end
89
86
  def make_request(action, params = {})
90
87
  path = params[:path] || "/"
91
88
  method = params[:method] || "post"
92
- env = Rack::MockRequest.env_for(path, :params => params.except(:path).except(:method), method: method)
89
+ env = Rack::MockRequest.env_for(path, params: params.except(:path).except(:method), method: method)
93
90
  status, headers, body = described_class.action(action).call(env)
94
91
  @response = ActionDispatch::TestResponse.new(status, headers, body)
95
- @controller = body.request.env['action_controller.instance']
92
+ @controller = body.instance_variable_get(:@response).request.env['action_controller.instance']
93
+ end
94
+
95
+ def response
96
+ @response
96
97
  end
98
+
@@ -2,14 +2,14 @@ require "spec_helper"
2
2
 
3
3
  describe Thesis::PageContent do
4
4
  let(:page) { create(:page) }
5
- let(:page_content) { create(:page_content, attributes.merge(page_id: page.id)) }
5
+ let(:page_content) { create(:page_content, attributes.merge(page: page)) }
6
6
 
7
7
  describe "#render" do
8
- subject { page_content.render }
8
+ subject { page_content.render(editable: true) }
9
9
 
10
10
  context "when the content type is 'html'" do
11
11
  let(:attributes) {{ content_type: 'html' }}
12
-
12
+
13
13
  it { should match /thesis-content-html/ }
14
14
  it { should match page_content.content }
15
15
  end
@@ -23,7 +23,7 @@ describe Thesis::PageContent do
23
23
 
24
24
  context "when the content type is 'image'" do
25
25
  let(:attributes) {{ content_type: "image" }}
26
-
26
+
27
27
  it { should match /thesis-content-image/ }
28
28
  it { should match /img/ }
29
29
  it { should match page_content.content }
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Thesis::RouteConstraint do
4
+ subject { Thesis::RouteConstraint.new }
5
+ let(:page) { create :page, template: "default" }
6
+
7
+ describe ".matches?" do
8
+ context "proper route" do
9
+ it "returns true" do
10
+ req = Struct.new(:path).new(page.slug)
11
+ expect(subject.matches?(req)).to be_true
12
+ end
13
+ end
14
+
15
+ context "invalid route" do
16
+ it "returns false" do
17
+ req = Struct.new(:path).new("invalid")
18
+ expect(subject.matches?(req)).to be_false
19
+ end
20
+ end
21
+ end
22
+ end
23
+
metadata CHANGED
@@ -1,39 +1,150 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - ClearSight Studio
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-30 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 3.2.13
19
+ version: '4.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 3.2.13
30
- description: ! 'Thesis: A Rails CMS that doesn''t hijack your development workflow.'
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sass
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.3'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sass-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description: 'Thesis: A Rails CMS that doesn''t hijack your development workflow.'
31
56
  email:
32
57
  - contact@clearsightstudio.com
33
58
  executables: []
34
59
  extensions: []
35
60
  extra_rdoc_files: []
36
61
  files:
62
+ - LICENSE.txt
63
+ - README.md
64
+ - app/assets/javascripts/thesis.js
65
+ - app/assets/javascripts/thesis/hallo.js
66
+ - app/assets/javascripts/thesis/rangy-core.js
67
+ - app/assets/javascripts/thesis/thesis.coffee
68
+ - app/assets/javascripts/thesis/utilities.coffee
69
+ - app/assets/stylesheets/thesis.sass
70
+ - app/assets/stylesheets/thesis/_mixins/_barber-pole.sass
71
+ - app/assets/stylesheets/thesis/_mixins/editor.sass
72
+ - app/assets/stylesheets/thesis/_thesis.sass
73
+ - app/assets/stylesheets/thesis/base/_base.sass
74
+ - app/assets/stylesheets/thesis/base/_colors.sass
75
+ - app/assets/stylesheets/thesis/base/_fonts.sass
76
+ - app/assets/stylesheets/thesis/base/_forms.scss
77
+ - app/assets/stylesheets/thesis/base/_keyframes.sass
78
+ - app/assets/stylesheets/thesis/base/bourbon/_bourbon-deprecated-upcoming.scss
79
+ - app/assets/stylesheets/thesis/base/bourbon/_bourbon.scss
80
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_button.scss
81
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_clearfix.scss
82
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_directional-values.scss
83
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_ellipsis.scss
84
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_font-family.scss
85
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_hide-text.scss
86
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_html5-input-types.scss
87
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_position.scss
88
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_prefixer.scss
89
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_retina-image.scss
90
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_size.scss
91
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_timing-functions.scss
92
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_triangle.scss
93
+ - app/assets/stylesheets/thesis/base/bourbon/addons/_word-wrap.scss
94
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_animation.scss
95
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_appearance.scss
96
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_backface-visibility.scss
97
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_background-image.scss
98
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_background.scss
99
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_border-image.scss
100
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_border-radius.scss
101
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_box-sizing.scss
102
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_calc.scss
103
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_columns.scss
104
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_filter.scss
105
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_flex-box.scss
106
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_font-face.scss
107
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_font-feature-settings.scss
108
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_hidpi-media-query.scss
109
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_hyphens.scss
110
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_image-rendering.scss
111
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_keyframes.scss
112
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_linear-gradient.scss
113
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_perspective.scss
114
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_placeholder.scss
115
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_radial-gradient.scss
116
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_transform.scss
117
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_transition.scss
118
+ - app/assets/stylesheets/thesis/base/bourbon/css3/_user-select.scss
119
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_assign.scss
120
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_color-lightness.scss
121
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_flex-grid.scss
122
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_golden-ratio.scss
123
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_grid-width.scss
124
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_modular-scale.scss
125
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_px-to-em.scss
126
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_px-to-rem.scss
127
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_strip-units.scss
128
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_tint-shade.scss
129
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_transition-property-name.scss
130
+ - app/assets/stylesheets/thesis/base/bourbon/functions/_unpack.scss
131
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_convert-units.scss
132
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_gradient-positions-parser.scss
133
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_is-num.scss
134
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-angle-parser.scss
135
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-gradient-parser.scss
136
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-positions-parser.scss
137
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_linear-side-corner-parser.scss
138
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-arg-parser.scss
139
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-gradient-parser.scss
140
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_radial-positions-parser.scss
141
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_render-gradients.scss
142
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_shape-size-stripper.scss
143
+ - app/assets/stylesheets/thesis/base/bourbon/helpers/_str-to-num.scss
144
+ - app/assets/stylesheets/thesis/base/bourbon/settings/_asset-pipeline.scss
145
+ - app/assets/stylesheets/thesis/base/bourbon/settings/_prefixer.scss
146
+ - app/assets/stylesheets/thesis/base/bourbon/settings/_px-to-em.scss
147
+ - config/routes.rb
37
148
  - lib/generators/thesis/install/install_generator.rb
38
149
  - lib/generators/thesis/install/templates/migrations/thesis_create_page.rb
39
150
  - lib/generators/thesis/install/templates/migrations/thesis_create_page_content.rb
@@ -41,6 +152,7 @@ files:
41
152
  - lib/generators/thesis/install/templates/page_templates/default.html.haml
42
153
  - lib/generators/thesis/install/templates/page_templates/default.html.slim
43
154
  - lib/tasks/thesis_tasks.rake
155
+ - lib/thesis.rb
44
156
  - lib/thesis/colorizer.rb
45
157
  - lib/thesis/controllers/controller_helpers.rb
46
158
  - lib/thesis/controllers/thesis_controller.rb
@@ -52,73 +164,42 @@ files:
52
164
  - lib/thesis/routing/route_constraint.rb
53
165
  - lib/thesis/routing/routes.rb
54
166
  - lib/thesis/version.rb
55
- - lib/thesis.rb
56
- - app/assets/javascripts/thesis/hallo.js
57
- - app/assets/javascripts/thesis/rangy-core.js
58
- - app/assets/javascripts/thesis/thesis.js.coffee
59
- - app/assets/javascripts/thesis.js
60
- - app/assets/stylesheets/thesis/font/fontawesome-webfont.eot
61
- - app/assets/stylesheets/thesis/font/fontawesome-webfont.svg
62
- - app/assets/stylesheets/thesis/font/fontawesome-webfont.ttf
63
- - app/assets/stylesheets/thesis/font/fontawesome-webfont.woff
64
- - app/assets/stylesheets/thesis/font/FontAwesome.otf
65
- - app/assets/stylesheets/thesis/font-awesome/font-awesome.scss
66
- - app/assets/stylesheets/thesis/jquery-ui/images/animated-overlay.gif
67
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_flat_30_cccccc_40x100.png
68
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_flat_50_5c5c5c_40x100.png
69
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_20_555555_1x400.png
70
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_40_0078a3_1x400.png
71
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_glass_40_ffc73d_1x400.png
72
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_gloss-wave_25_333333_500x100.png
73
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
74
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_inset-soft_25_000000_1x100.png
75
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-bg_inset-soft_30_f58400_1x100.png
76
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_222222_256x240.png
77
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_4b8e0b_256x240.png
78
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_a83300_256x240.png
79
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_cccccc_256x240.png
80
- - app/assets/stylesheets/thesis/jquery-ui/images/ui-icons_ffffff_256x240.png
81
- - app/assets/stylesheets/thesis/jquery-ui/jquery-ui-1.10.2.custom.css
82
- - app/assets/stylesheets/thesis/thesis.css.scss
83
- - app/assets/stylesheets/thesis.css
84
- - config/routes.rb
85
- - README.md
86
- - LICENSE.txt
87
167
  - spec/factories/page_contents.rb
88
168
  - spec/factories/pages.rb
89
- - spec/lib/thesis/controllers/thesis_controller_spec.rb
90
- - spec/lib/thesis/models/page_content_spec.rb
91
- - spec/lib/thesis/models/page_spec.rb
92
169
  - spec/spec_helper.rb
170
+ - spec/thesis/controllers/thesis_controller_spec.rb
171
+ - spec/thesis/models/page_content_spec.rb
172
+ - spec/thesis/models/page_spec.rb
173
+ - spec/thesis/routing/thesis_routing_spec.rb
93
174
  homepage: https://github.com/clearsightstudio/thesis
94
175
  licenses: []
176
+ metadata: {}
95
177
  post_install_message:
96
178
  rdoc_options: []
97
179
  require_paths:
98
180
  - lib
99
181
  - app
100
182
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
183
  requirements:
103
- - - ! '>='
184
+ - - ">="
104
185
  - !ruby/object:Gem::Version
105
- version: 1.9.3
186
+ version: 2.0.0
106
187
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
188
  requirements:
109
- - - ! '>='
189
+ - - ">="
110
190
  - !ruby/object:Gem::Version
111
191
  version: '0'
112
192
  requirements: []
113
193
  rubyforge_project:
114
- rubygems_version: 1.8.25
194
+ rubygems_version: 2.2.2
115
195
  signing_key:
116
- specification_version: 3
117
- summary: ! 'Thesis: A Rails CMS that doesn''t hijack your development workflow.'
196
+ specification_version: 4
197
+ summary: 'Thesis: A Rails CMS that doesn''t hijack your development workflow.'
118
198
  test_files:
119
199
  - spec/factories/page_contents.rb
120
200
  - spec/factories/pages.rb
121
- - spec/lib/thesis/controllers/thesis_controller_spec.rb
122
- - spec/lib/thesis/models/page_content_spec.rb
123
- - spec/lib/thesis/models/page_spec.rb
124
201
  - spec/spec_helper.rb
202
+ - spec/thesis/controllers/thesis_controller_spec.rb
203
+ - spec/thesis/models/page_content_spec.rb
204
+ - spec/thesis/models/page_spec.rb
205
+ - spec/thesis/routing/thesis_routing_spec.rb
@@ -1,157 +0,0 @@
1
- Thesis =
2
- setup: ->
3
- @edit_mode = false
4
- if this.requirements() && this.page_is_editable()
5
- this.draw_editor()
6
- this.set_up_bindings()
7
-
8
- requirements: ->
9
- if jQuery.ui
10
- true
11
- else
12
- alert "jQuery UI not included. Thesis will not work properly without it."
13
- false
14
-
15
- edit_mode: ->
16
- @edit_mode
17
-
18
- page_is_editable: ->
19
- this.thesis().length > 0
20
-
21
- thesis: ->
22
- @thesis = $("#thesis-editor")
23
-
24
- set_up_bindings: ->
25
- t = this
26
- @edit_page_button.on "click", (e)->
27
- e.preventDefault()
28
- t.toggle_edit_mode()
29
-
30
- editing: ->
31
- $("body").hasClass("thesis-editing")
32
-
33
- hallo_text_options: ->
34
- options =
35
- editable: true
36
-
37
- hallo_html_options: ->
38
- options =
39
- editable: true
40
- plugins:
41
- 'halloformat': {}
42
- 'halloheadings': {}
43
- 'hallojustify': {}
44
- 'hallolists': {}
45
- 'halloreundo': {}
46
- 'hallolink': {}
47
- # 'halloimage': {} # Someday?
48
-
49
- start_editing: ->
50
- $("body").append($("<div></div>").addClass("fader"))
51
- $("body").addClass("thesis-editing")
52
- $(".thesis-content-html").hallo this.hallo_html_options()
53
- $(".thesis-content-text").hallo this.hallo_text_options()
54
-
55
- end_editing: ->
56
- $(".fader").remove()
57
- $("body").removeClass("thesis-editing")
58
- $(".thesis-content-html").hallo editable: false
59
- $(".thesis-content-text").hallo editable: false
60
-
61
- save_content: ->
62
- # Gather the content for posting
63
- payload = {}
64
- $(".thesis-content-html, .thesis-content-text").each ()->
65
- content_area = $(this)
66
- content_id = content_area.data("thesis-content-id")
67
- payload[content_id] = content_area.html()
68
-
69
- $.ajax
70
- url: "/thesis/update_page_content"
71
- data: payload
72
- type: "put"
73
- dataType: "json"
74
- success: ->
75
- alert "Page saved."
76
- error: ->
77
- alert "Sorry, couldn't save this page."
78
-
79
- add_page: ->
80
- page_name = prompt "What is the name of the new page?"
81
- if page_name
82
- parent_slug = null
83
- if confirm("Make this a subpage of the current page?")
84
- parent_slug = window.location.pathname
85
- $.ajax
86
- url: "/thesis/create_page"
87
- data:
88
- name: page_name
89
- parent_slug: parent_slug
90
- type: "post"
91
- dataType: "json"
92
- success: (resp, status, xhr)->
93
- if resp && resp.page
94
- window.location = resp.page.slug
95
- else
96
- alert "Unknown error"
97
- error: ->
98
- alert "Sorry, couldn't save this page."
99
-
100
- delete_page: ->
101
- really_sure = confirm "Are you sure you want to delete this page? There is no undo!"
102
- if really_sure
103
- $.ajax
104
- url: "/thesis/delete_page"
105
- data:
106
- slug: window.location.pathname
107
- type: "delete"
108
- # dataType: "json"
109
- success: ->
110
- alert "Page was deleted."
111
- error: ->
112
- alert "Sorry, couldn't delete this page."
113
-
114
-
115
- toggle_edit_mode: ->
116
- if this.editing()
117
- this.end_editing()
118
- else
119
- this.start_editing()
120
-
121
- draw_editor: ->
122
- @thesis.append this.draw_edit_page_button()
123
-
124
- draw_edit_icon: ->
125
- @edit_icon = $("<i></i>").addClass("icon-edit icon-2x")
126
-
127
- draw_save_icon: ->
128
- @save_icon = $("<i></i>").addClass("icon-save icon-2x")
129
- @save_icon.on "click", ->
130
- Thesis.save_content()
131
-
132
- draw_add_icon: ->
133
- @add_icon = $("<i></i>").addClass("icon-plus icon-2x")
134
- @add_icon.on "click", ->
135
- Thesis.add_page()
136
-
137
- draw_delete_icon: ->
138
- @delete_icon = $("<i></i>").addClass("icon-trash icon-2x")
139
- @delete_icon.on "click", ->
140
- Thesis.delete_page()
141
-
142
- draw_cancel_icon: ->
143
- @cancel_icon = $("<i></i>").addClass("icon-remove icon-2x")
144
-
145
- draw_edit_page_button: ->
146
- @edit_page_button = $("<a></a>").attr("href", "#").attr("id", "thesis-edit-page")
147
- @edit_page_button.append(this.draw_edit_icon())
148
- @edit_page_button.append(this.draw_cancel_icon())
149
- @edit_page_button.append(this.draw_save_icon())
150
- @edit_page_button.append(this.draw_add_icon())
151
- @edit_page_button.append(this.draw_delete_icon())
152
- @edit_page_button
153
-
154
- jQuery ($)->
155
- Thesis.setup()
156
-
157
- # window.Thesis = Thesis # Enable if necessary