web_backend 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in web_backend.gemspec
4
+ gemspec
5
+
6
+ require "on_the_spot"
data/README ADDED
@@ -0,0 +1 @@
1
+ This file was created by JetBrains RubyMine 3.1 for binding GitHub repository
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,9 @@
1
+ class TranslationsController < ApplicationController
2
+ def index
3
+
4
+ end
5
+
6
+ def update
7
+
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ <%= translation.value %>
data/config/routes.rb ADDED
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+ resources :translations
3
+ end
4
+
@@ -0,0 +1,22 @@
1
+ require 'on_the_spot/controller_extension'
2
+ module WebBackend
3
+ module Helpers
4
+ module Base
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ extend OnTheSpot::ControllerExtension::ClassMethods
9
+ can_edit_on_the_spot
10
+ end
11
+
12
+
13
+ module InstanceMethods
14
+
15
+ end
16
+
17
+ module ClassMethods
18
+
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,17 @@
1
+ module WebBackend
2
+ module Helpers
3
+ module TranslationsHelper
4
+ def t(*args)
5
+ translation = TranslationEntry.new
6
+ translation.key = "#{I18n.locale}.#{I18n.namespace(*args)}"
7
+ translation.value = I18n.t(*args)
8
+ translation_edit translation
9
+ end
10
+
11
+ def translation_edit(translation)
12
+ render :partial => "/translation_entries/translation_edit_form", :locals => {:translation => translation}
13
+ end
14
+
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,22 @@
1
+ require "rails"
2
+ #require 'web_backend' if defined?(Rails)
3
+ require 'on_the_spot/controller_extension'
4
+ require 'helpers/base'
5
+ require 'helpers/translations_helper'
6
+
7
+
8
+ module WebBackend
9
+ class Engine < Rails::Engine
10
+ engine_name :web_backend
11
+ end
12
+ end
13
+
14
+ module ActionController
15
+ class Base
16
+ include WebBackend::Helpers::Base
17
+ end
18
+ end
19
+
20
+ module ApplicationHelper
21
+ include WebBackend::Helpers::TranslationsHelper
22
+ end
@@ -0,0 +1,3 @@
1
+ module WebBackend
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "web_backend/version"
4
+
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "web_backend"
8
+ s.version = WebBackend::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Mariusz Wyrozębski"]
11
+ s.email = ["mariuszwyrozebski@gmail.com"]
12
+ s.homepage = ""
13
+ s.summary = %q{This is backend for translations}
14
+ s.description = %q{Web backedn purpose is to let users translate their applications in more comfortable ways than before}
15
+
16
+ s.rubyforge_project = "web_backend"
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+ s.add_dependency('rails')
23
+ s.add_dependency('on_the_spot', '0.0.5')
24
+ s.add_development_dependency('on_the_spot', '0.0.5')
25
+
26
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: web_backend
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - "Mariusz Wyroz\xC4\x99bski"
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-04-04 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rails
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: on_the_spot
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ hash: 21
44
+ segments:
45
+ - 0
46
+ - 0
47
+ - 5
48
+ version: 0.0.5
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: on_the_spot
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - "="
58
+ - !ruby/object:Gem::Version
59
+ hash: 21
60
+ segments:
61
+ - 0
62
+ - 0
63
+ - 5
64
+ version: 0.0.5
65
+ type: :development
66
+ version_requirements: *id003
67
+ description: Web backedn purpose is to let users translate their applications in more comfortable ways than before
68
+ email:
69
+ - mariuszwyrozebski@gmail.com
70
+ executables: []
71
+
72
+ extensions: []
73
+
74
+ extra_rdoc_files: []
75
+
76
+ files:
77
+ - Gemfile
78
+ - README
79
+ - Rakefile
80
+ - app/controllers/translations_controller.rb
81
+ - app/views/translation_entries/_translation_edit_form.html.erb
82
+ - config/routes.rb
83
+ - lib/helpers/base.rb
84
+ - lib/helpers/translations_helper.rb
85
+ - lib/web_backend.rb
86
+ - lib/web_backend/version.rb
87
+ - web_backend.gemspec
88
+ has_rdoc: true
89
+ homepage: ""
90
+ licenses: []
91
+
92
+ post_install_message:
93
+ rdoc_options: []
94
+
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
113
+ - 0
114
+ version: "0"
115
+ requirements: []
116
+
117
+ rubyforge_project: web_backend
118
+ rubygems_version: 1.5.3
119
+ signing_key:
120
+ specification_version: 3
121
+ summary: This is backend for translations
122
+ test_files: []
123
+