trip_advisor 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.gitignore +52 -0
  4. data/.rspec +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +5 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +118 -0
  9. data/LICENSE.txt +20 -0
  10. data/README.md +23 -0
  11. data/Rakefile +7 -0
  12. data/lib/trip_advisor/api.rb +45 -0
  13. data/lib/trip_advisor/build.rb +221 -0
  14. data/lib/trip_advisor/rake_tasks.rb +182 -0
  15. data/lib/trip_advisor/resource_manager.rb +101 -0
  16. data/lib/trip_advisor/strings_file.rb +112 -0
  17. data/lib/trip_advisor/translation.rb +63 -0
  18. data/lib/trip_advisor/translation_tool.rb +110 -0
  19. data/lib/trip_advisor/version.rb +3 -0
  20. data/lib/trip_advisor.rb +5 -0
  21. data/run_tests.sh +6 -0
  22. data/spec/api_spec.rb +34 -0
  23. data/spec/builder_spec.rb +262 -0
  24. data/spec/fixtures/AndroidStrings.txt +21 -0
  25. data/spec/fixtures/Strings.txt +47 -0
  26. data/spec/fixtures/project.git/.gitignore +1 -0
  27. data/spec/fixtures/project.git/BUILD.json +7 -0
  28. data/spec/fixtures/project.git/Code/Project.h +0 -0
  29. data/spec/fixtures/project.git/Code/Project.m +0 -0
  30. data/spec/fixtures/project.git/Gemfile +3 -0
  31. data/spec/fixtures/project.git/Gemfile.lock +38 -0
  32. data/spec/fixtures/project.git/HEAD +1 -0
  33. data/spec/fixtures/project.git/LICENSE +1 -0
  34. data/spec/fixtures/project.git/Podfile +6 -0
  35. data/spec/fixtures/project.git/Podfile.lock +14 -0
  36. data/spec/fixtures/project.git/Project.podspec +14 -0
  37. data/spec/fixtures/project.git/TestProject/Images.xcassets/AppIcon.appiconset/Contents.json +23 -0
  38. data/spec/fixtures/project.git/TestProject/Images.xcassets/LaunchImage.launchimage/Contents.json +23 -0
  39. data/spec/fixtures/project.git/TestProject/TATPAppDelegate.h +15 -0
  40. data/spec/fixtures/project.git/TestProject/TATPAppDelegate.m +49 -0
  41. data/spec/fixtures/project.git/TestProject/TestProject-Info.plist +38 -0
  42. data/spec/fixtures/project.git/TestProject/TestProject-Prefix.pch +16 -0
  43. data/spec/fixtures/project.git/TestProject/en.lproj/InfoPlist.strings +1 -0
  44. data/spec/fixtures/project.git/TestProject/main.m +18 -0
  45. data/spec/fixtures/project.git/TestProject.xcodeproj/project.pbxproj +1020 -0
  46. data/spec/fixtures/project.git/TestProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  47. data/spec/fixtures/project.git/TestProject.xcodeproj/project.xcworkspace/xcuserdata/blake.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  48. data/spec/fixtures/project.git/TestProject.xcodeproj/xcuserdata/blake.xcuserdatad/xcschemes/TestProject.xcscheme +96 -0
  49. data/spec/fixtures/project.git/TestProject.xcodeproj/xcuserdata/blake.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
  50. data/spec/fixtures/project.git/TestProject.xcworkspace/contents.xcworkspacedata +1 -0
  51. data/spec/fixtures/project.git/TestProjectTests/TestProjectTests-Info.plist +22 -0
  52. data/spec/fixtures/project.git/TestProjectTests/TestProjectTests.m +34 -0
  53. data/spec/fixtures/project.git/TestProjectTests/en.lproj/InfoPlist.strings +1 -0
  54. data/spec/fixtures/project.git/VERSION +1 -0
  55. data/spec/fixtures/project.git/config +7 -0
  56. data/spec/fixtures/project.git/description +1 -0
  57. data/spec/fixtures/project.git/index +0 -0
  58. data/spec/fixtures/project.git/info/exclude +6 -0
  59. data/spec/fixtures/project.git/logs/HEAD +1 -0
  60. data/spec/fixtures/project.git/logs/refs/heads/master +1 -0
  61. data/spec/fixtures/project.git/objects/00/a6b3f80ebbe4019f03461416061e8805e6eab1 +0 -0
  62. data/spec/fixtures/project.git/objects/03/c303d5552f29d366d11a13448c3c18e94c3bfa +0 -0
  63. data/spec/fixtures/project.git/objects/03/ff7c3a95a196ac8ad1d53db2bd4fb4c80507c1 +0 -0
  64. data/spec/fixtures/project.git/objects/0a/7123364a174ffda52d29a18cdd31fd325bbd6c +0 -0
  65. data/spec/fixtures/project.git/objects/0d/183cba8b0a5e477ea1d001130c222af19b8324 +0 -0
  66. data/spec/fixtures/project.git/objects/0e/6ba5232c3c2f8a7e435794e845b5dc9f339d8b +0 -0
  67. data/spec/fixtures/project.git/objects/25/5b4ee687ed1337cffb10e6d07bb89ee6e5d180 +0 -0
  68. data/spec/fixtures/project.git/objects/25/60a2b9ab9323ca61a0fdebd3b4af46dbe4c272 +0 -0
  69. data/spec/fixtures/project.git/objects/2b/f8bd93d56787a7548c7f8960a94f05c269b486 +0 -0
  70. data/spec/fixtures/project.git/objects/38/439105a884d2556443c7b5c645034e67fb7987 +0 -0
  71. data/spec/fixtures/project.git/objects/3e/efcb9dd5b38e2c1dc061052455dd97bcd51e6c +0 -0
  72. data/spec/fixtures/project.git/objects/53/8b3019ab68814604fbc8e017d09b690c22728c +0 -0
  73. data/spec/fixtures/project.git/objects/59/c178850684e21fafbebedeff15b2b522402af2 +0 -0
  74. data/spec/fixtures/project.git/objects/62/037867910d9aa803d7e02addc26574e270d3d8 +0 -0
  75. data/spec/fixtures/project.git/objects/66/05c1af131470a3b635d166f2591917b32f3b82 +0 -0
  76. data/spec/fixtures/project.git/objects/69/67e396037a52d8300eb9dc8a1e9f7155dd55bf +0 -0
  77. data/spec/fixtures/project.git/objects/6b/5ad4043aee9bc0936466760665f870d4f2f40f +0 -0
  78. data/spec/fixtures/project.git/objects/6c/fc746d4ecf2e3ac67bb0cf6c4013e1aff9b1f1 +0 -0
  79. data/spec/fixtures/project.git/objects/6f/3b0ab36651ca648408c176f81e4b2e202efa0b +0 -0
  80. data/spec/fixtures/project.git/objects/74/3435c9bee5c433fe166891e698fdc70d81a3de +0 -0
  81. data/spec/fixtures/project.git/objects/96/81bfb8ec019f74df384cfb66d68e94bd6d9005 +0 -0
  82. data/spec/fixtures/project.git/objects/99/fa9259e929fe3bee4791ff2a63070fc0358c0a +3 -0
  83. data/spec/fixtures/project.git/objects/a1/5f8980cfbf126a9a0b3ddf7fb1c3fbd6480934 +2 -0
  84. data/spec/fixtures/project.git/objects/a3/96706db4ec4cfca4d984d38b90dc8098bded40 +1 -0
  85. data/spec/fixtures/project.git/objects/b4/42134ccda2b0b1813288e7e04a401a4bef2b59 +0 -0
  86. data/spec/fixtures/project.git/objects/b9/2732c79e00cf2fad5ceceb61bbc7a9a9739d2c +0 -0
  87. data/spec/fixtures/project.git/objects/ba/01f5352549018dfdb95423b9e0974443ec0346 +1 -0
  88. data/spec/fixtures/project.git/objects/ba/8dd7d2162334426facd310f62ed923eb6f4cf5 +0 -0
  89. data/spec/fixtures/project.git/objects/bf/422763a0101a5971e15d53581acb825b4d38b8 +0 -0
  90. data/spec/fixtures/project.git/objects/c7/9ebd3ada1309bae694b8e6760592b1254e035c +2 -0
  91. data/spec/fixtures/project.git/objects/ca/7ced48ee61e517fc57576a33dc9d95f5d4f539 +2 -0
  92. data/spec/fixtures/project.git/objects/ce/eed5f059b6d374d08e0b1e732463842b3a5a91 +0 -0
  93. data/spec/fixtures/project.git/objects/d7/89fd591fee7d26c2f40c6614b5a91931377f88 +0 -0
  94. data/spec/fixtures/project.git/objects/d8/ec4dbb2804f53fd863cd0adb830c5bf4e85a1d +0 -0
  95. data/spec/fixtures/project.git/objects/dc/680e07f12748657d5a798495f08ce3ad884f0b +0 -0
  96. data/spec/fixtures/project.git/objects/de/de871ad5691708aca809557a823082a70dde69 +0 -0
  97. data/spec/fixtures/project.git/objects/e0/30730e56be52e4dc293c829f73e0c586073ad2 +0 -0
  98. data/spec/fixtures/project.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
  99. data/spec/fixtures/project.git/objects/e6/f7f8a92eb3177d10a809b96f41905e9be4cc2b +0 -0
  100. data/spec/fixtures/project.git/objects/ed/7115c4ae4c1885ee75f6ffe946b559546efd28 +0 -0
  101. data/spec/fixtures/project.git/objects/f1/e01dd1256054d5717ef0c89008f0a22639e273 +2 -0
  102. data/spec/fixtures/project.git/objects/f9/3e9c03a56aba331bcd98cb2ef00ba0003de285 +0 -0
  103. data/spec/fixtures/project.git/refs/heads/master +1 -0
  104. data/spec/fixtures/search.json +14159 -0
  105. data/spec/fixtures/search_results_1-50.html +1076 -0
  106. data/spec/fixtures/search_results_101-110.html +476 -0
  107. data/spec/fixtures/search_results_51-100.html +1076 -0
  108. data/spec/fixtures/translation_details.html +728 -0
  109. data/spec/fixtures/translation_details.json +738 -0
  110. data/spec/spec_helper.rb +28 -0
  111. data/spec/strings_file_spec.rb +225 -0
  112. data/spec/translation_spec.rb +21 -0
  113. data/spec/translation_tool_spec.rb +146 -0
  114. data/trip_advisor.gemspec +38 -0
  115. metadata +474 -0
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:TestProject.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,96 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0500"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "25F03B691805C03D00D2A576"
18
+ BuildableName = "TestProject.app"
19
+ BlueprintName = "TestProject"
20
+ ReferencedContainer = "container:TestProject.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
+ shouldUseLaunchSchemeArgsEnv = "YES"
29
+ buildConfiguration = "Debug">
30
+ <Testables>
31
+ <TestableReference
32
+ skipped = "NO">
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "25F03B841805C03D00D2A576"
36
+ BuildableName = "TestProjectTests.xctest"
37
+ BlueprintName = "TestProjectTests"
38
+ ReferencedContainer = "container:TestProject.xcodeproj">
39
+ </BuildableReference>
40
+ </TestableReference>
41
+ </Testables>
42
+ <MacroExpansion>
43
+ <BuildableReference
44
+ BuildableIdentifier = "primary"
45
+ BlueprintIdentifier = "25F03B691805C03D00D2A576"
46
+ BuildableName = "TestProject.app"
47
+ BlueprintName = "TestProject"
48
+ ReferencedContainer = "container:TestProject.xcodeproj">
49
+ </BuildableReference>
50
+ </MacroExpansion>
51
+ </TestAction>
52
+ <LaunchAction
53
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
54
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
55
+ launchStyle = "0"
56
+ useCustomWorkingDirectory = "NO"
57
+ buildConfiguration = "Debug"
58
+ ignoresPersistentStateOnLaunch = "NO"
59
+ debugDocumentVersioning = "YES"
60
+ allowLocationSimulation = "YES">
61
+ <BuildableProductRunnable>
62
+ <BuildableReference
63
+ BuildableIdentifier = "primary"
64
+ BlueprintIdentifier = "25F03B691805C03D00D2A576"
65
+ BuildableName = "TestProject.app"
66
+ BlueprintName = "TestProject"
67
+ ReferencedContainer = "container:TestProject.xcodeproj">
68
+ </BuildableReference>
69
+ </BuildableProductRunnable>
70
+ <AdditionalOptions>
71
+ </AdditionalOptions>
72
+ </LaunchAction>
73
+ <ProfileAction
74
+ shouldUseLaunchSchemeArgsEnv = "YES"
75
+ savedToolIdentifier = ""
76
+ useCustomWorkingDirectory = "NO"
77
+ buildConfiguration = "Release"
78
+ debugDocumentVersioning = "YES">
79
+ <BuildableProductRunnable>
80
+ <BuildableReference
81
+ BuildableIdentifier = "primary"
82
+ BlueprintIdentifier = "25F03B691805C03D00D2A576"
83
+ BuildableName = "TestProject.app"
84
+ BlueprintName = "TestProject"
85
+ ReferencedContainer = "container:TestProject.xcodeproj">
86
+ </BuildableReference>
87
+ </BuildableProductRunnable>
88
+ </ProfileAction>
89
+ <AnalyzeAction
90
+ buildConfiguration = "Debug">
91
+ </AnalyzeAction>
92
+ <ArchiveAction
93
+ buildConfiguration = "Release"
94
+ revealArchiveInOrganizer = "YES">
95
+ </ArchiveAction>
96
+ </Scheme>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>TestProject.xcscheme</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ <key>SuppressBuildableAutocreation</key>
14
+ <dict>
15
+ <key>25F03B691805C03D00D2A576</key>
16
+ <dict>
17
+ <key>primary</key>
18
+ <true/>
19
+ </dict>
20
+ <key>25F03B841805C03D00D2A576</key>
21
+ <dict>
22
+ <key>primary</key>
23
+ <true/>
24
+ </dict>
25
+ </dict>
26
+ </dict>
27
+ </plist>
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:TestProject.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>${EXECUTABLE_NAME}</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>com.tripadvisor.TestProject.${PRODUCT_NAME:rfc1034identifier}</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundlePackageType</key>
14
+ <string>BNDL</string>
15
+ <key>CFBundleShortVersionString</key>
16
+ <string>1.0</string>
17
+ <key>CFBundleSignature</key>
18
+ <string>????</string>
19
+ <key>CFBundleVersion</key>
20
+ <string>1</string>
21
+ </dict>
22
+ </plist>
@@ -0,0 +1,34 @@
1
+ //
2
+ // TestProjectTests.m
3
+ // TestProjectTests
4
+ //
5
+ // Created by Blake Watters on 10/9/13.
6
+ // Copyright (c) 2013 TripAdvisor. All rights reserved.
7
+ //
8
+
9
+ #import <XCTest/XCTest.h>
10
+
11
+ @interface TestProjectTests : XCTestCase
12
+
13
+ @end
14
+
15
+ @implementation TestProjectTests
16
+
17
+ - (void)setUp
18
+ {
19
+ [super setUp];
20
+ // Put setup code here. This method is called before the invocation of each test method in the class.
21
+ }
22
+
23
+ - (void)tearDown
24
+ {
25
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
26
+ [super tearDown];
27
+ }
28
+
29
+ - (void)testExample
30
+ {
31
+ XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32
+ }
33
+
34
+ @end
@@ -0,0 +1 @@
1
+ /* Localized versions of Info.plist keys */
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,7 @@
1
+ [core]
2
+ repositoryformatversion = 0
3
+ filemode = true
4
+ bare = false
5
+ logallrefupdates = true
6
+ ignorecase = true
7
+ precomposeunicode = true
@@ -0,0 +1 @@
1
+ Unnamed repository; edit this file 'description' to name the repository.
Binary file
@@ -0,0 +1,6 @@
1
+ # git ls-files --others --exclude-from=.git/info/exclude
2
+ # Lines that start with '#' are comments.
3
+ # For a project mostly in C, the following would be a good set of
4
+ # exclude patterns (uncomment them if you want to use them):
5
+ # *.[oa]
6
+ # *~
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 ba01f5352549018dfdb95423b9e0974443ec0346 Kurry Tran <kurry.tran@gmail.com> 1413487083 -0400 commit (initial): first commit
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 ba01f5352549018dfdb95423b9e0974443ec0346 Kurry Tran <kurry.tran@gmail.com> 1413487083 -0400 commit (initial): first commit
@@ -0,0 +1,3 @@
1
+ x]O�N�0 圯��e Ԭ�i!
2
+ \*.j�sژ6�őcm�ߓv��Ŗ����<u�ٕ7Z+���9T1������$�o�%� �Ƙy ���� �r
3
+ P��N���Hqb7���6�r
@@ -0,0 +1,2 @@
1
+ x5�A
2
+ �0D]�!k-?I�""�A���FZl��ƺ�n�tVüj=1 f�N�,>�06���"����W�Jj'`�E�B�Bf��C��^Z��\���q�c�⇌�*+�9ٜH�L��Q��J�P��k���k��ŇcW�q�����S ̀�Ԍ>���<�$_�*9�
@@ -0,0 +1 @@
1
+ xK��OR066f��RPP��MLO-VR�R�r@� ������ W�,���KUҁ�gV��%�,+�,�ēs�J`ŵ=��ibPab@e3� *�� tm,ȭJ�yi� �A��T�ZT���1��E)��$#�������T�Ok�j�YMb
@@ -0,0 +1 @@
1
+ x��A� E]s���� ӡ$Ƹw�(%JIp���b�������C-% h�v�b�G���1�9�3L̖�yL�Ņ�!&�7�����7\�_���� �Ϸ��s��@�6���� Q��_J�KV)�����>�L:V
@@ -0,0 +1,2 @@
1
+ x���
2
+ �0 E��W�<ϱ�0د�=T�3`iӡ �}�"����7�͹Uϕ*���Δ2���MݗR���#����Fv�4 �j�M�h����(�l��������uC�L0�����_��fs=��>_�Ӛb�d;��?�҇J�a��P��r��#��@��H���W �t��]J`���œ�m�v
@@ -0,0 +1,2 @@
1
+ xM�=!@akN1�
2
+ K��6^`O0�(6C�Yϯ�B����(�[܁i1�."����*e&�f/ WJl�=G6�տ��av�$#�vL��4>�F��l���Uo(7�J<�bf�:%��G��'���� �h���8N
@@ -0,0 +1,2 @@
1
+ x]PMK�@���b��DB�1xE���Rh����&���n���������9 3�ͼyLa\�]r%���U���T��yC�K� Z*�
2
+ ����𥘑<8 �R��$��AםH�
@@ -0,0 +1 @@
1
+ ba01f5352549018dfdb95423b9e0974443ec0346